You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openmeetings.apache.org by so...@apache.org on 2022/04/21 08:52:40 UTC
[openmeetings] 02/02: The build is green
This is an automated email from the ASF dual-hosted git repository.
solomax pushed a commit to branch java11-modules
in repository https://gitbox.apache.org/repos/asf/openmeetings.git
commit 20027412d670fb526c11a49b33890412f7313d37
Author: Maxim Solodovnik <so...@gmail.com>
AuthorDate: Thu Apr 21 15:52:27 2022 +0700
The build is green
---
.../apache/openmeetings/db/util/ApplicationHelper.java | 6 +++++-
.../org/apache/openmeetings/backup/BackupImport.java | 18 +++++++++++++++++-
.../openmeetings/service/scheduler/ReminderJob.java | 4 ++--
.../apache/openmeetings/util/OMContextListener.java | 2 +-
.../web/service/mail/TestSubjTemplate.java | 2 +-
.../openmeetings/web/test/backup/TestExport.java | 4 ++--
pom.xml | 4 ++--
7 files changed, 30 insertions(+), 10 deletions(-)
diff --git a/openmeetings-db/src/main/java/org/apache/openmeetings/db/util/ApplicationHelper.java b/openmeetings-db/src/main/java/org/apache/openmeetings/db/util/ApplicationHelper.java
index 22f351034..e92fb4c6c 100644
--- a/openmeetings-db/src/main/java/org/apache/openmeetings/db/util/ApplicationHelper.java
+++ b/openmeetings-db/src/main/java/org/apache/openmeetings/db/util/ApplicationHelper.java
@@ -127,7 +127,11 @@ public class ApplicationHelper {
} catch(IllegalStateException e) {
app.setServletContext(new MockServletContext(app, null));
}
- app.setConfigurationType(RuntimeConfigurationType.DEPLOYMENT);
+ try {
+ app.setConfigurationType(RuntimeConfigurationType.DEPLOYMENT);
+ } catch (IllegalStateException e) {
+ // no-op, might be already set
+ }
OMContextListener omcl = new OMContextListener();
omcl.contextInitialized(new ServletContextEvent(app.getServletContext()));
ThreadContext.setApplication(app);
diff --git a/openmeetings-install/src/main/java/org/apache/openmeetings/backup/BackupImport.java b/openmeetings-install/src/main/java/org/apache/openmeetings/backup/BackupImport.java
index 309f1c642..2216e45ee 100644
--- a/openmeetings-install/src/main/java/org/apache/openmeetings/backup/BackupImport.java
+++ b/openmeetings-install/src/main/java/org/apache/openmeetings/backup/BackupImport.java
@@ -516,6 +516,7 @@ public class BackupImport {
messageFolderMap.put(TRASH_FOLDER_ID, TRASH_FOLDER_ID);
}
+ // public for testing
public static BackupVersion getVersion(File base) {
List<BackupVersion> list = new ArrayList<>(1);
readList(base, "version.xml", VERSION_LIST_NODE, VERSION_NODE, BackupVersion.class, list::add, true);
@@ -525,6 +526,7 @@ public class BackupImport {
/*
* ##################### Import Configs
*/
+ // public for testing
public void importConfigs(File base) throws Exception {
final Map<Integer, String> keyMap = new HashMap<>();
Arrays.stream(KeyEvent.class.getDeclaredFields())
@@ -588,6 +590,7 @@ public class BackupImport {
/*
* ##################### Import Groups
*/
+ // public for testing
public void importGroups(File base) throws Exception {
log.info("Configs import complete, starting group import");
readList(base, "organizations.xml", GROUP_LIST_NODE, GROUP_NODE, Group.class, g -> {
@@ -601,6 +604,7 @@ public class BackupImport {
/*
* ##################### Import LDAP Configs
*/
+ // public for testing
public Long importLdap(File base) {
log.info("Groups import complete, starting LDAP config import");
Long[] defaultLdapId = {cfgDao.getLong(CONFIG_DEFAULT_LDAP_ID, null)};
@@ -624,6 +628,7 @@ public class BackupImport {
/*
* ##################### OAuth2 servers
*/
+ // public for testing
public void importOauth(File base) {
log.info("Ldap config import complete, starting OAuth2 server import");
readList(base, "oauth2servers.xml", OAUTH_LIST_NODE, OAUTH_NODE, OAuthServer.class
@@ -640,6 +645,7 @@ public class BackupImport {
/*
* ##################### Import Users
*/
+ // public for testing
public void importUsers(File base) throws Exception {
log.info("OAuth2 servers import complete, starting user import");
String jNameTimeZone = getDefaultTimezone();
@@ -731,7 +737,8 @@ public class BackupImport {
/*
* ##################### Import Rooms
*/
- void importRooms(File base) throws Exception {
+ // public for testing
+ public void importRooms(File base) throws Exception {
log.info("Users import complete, starting room import");
Class<Room> eClazz = Room.class;
JAXBContext jc = JAXBContext.newInstance(eClazz);
@@ -766,6 +773,7 @@ public class BackupImport {
/*
* ##################### Import Room Groups
*/
+ // public for testing
public void importRoomGroups(File base) throws Exception {
log.info("Room import complete, starting room groups import");
Class<RoomGroup> eClazz = RoomGroup.class;
@@ -795,6 +803,7 @@ public class BackupImport {
/*
* ##################### Import Chat messages
*/
+ // public for testing
public void importChat(File base) throws Exception {
log.info("Room groups import complete, starting chat messages import");
Class<ChatMessage> eClazz = ChatMessage.class;
@@ -818,6 +827,7 @@ public class BackupImport {
/*
* ##################### Import Calendars
*/
+ // public for testing
public void importCalendars(File base) throws Exception {
log.info("Chat messages import complete, starting calendar import");
Class<OmCalendar> eClazz = OmCalendar.class;
@@ -836,6 +846,7 @@ public class BackupImport {
/*
* ##################### Import Appointments
*/
+ // public for testing
public void importAppointments(File base) throws Exception {
log.info("Calendar import complete, starting appointement import");
Class<Appointment> eClazz = Appointment.class;
@@ -871,6 +882,7 @@ public class BackupImport {
*
* Reminder Invitations will be NOT send!
*/
+ // public for testing
public void importMeetingMembers(File base) throws Exception {
log.info("Appointement import complete, starting meeting members import");
Class<MeetingMember> eClazz = MeetingMember.class;
@@ -961,9 +973,11 @@ public class BackupImport {
remain.entrySet().forEach(e -> log.warn("Doungling file/recording: {}", e.getValue()));
tree.process(f -> isInvalidFile(f, folders), save);
}
+
/*
* ##################### Import Recordings
*/
+ // public for testing
public void importRecordings(File base) throws Exception {
log.info("Meeting members import complete, starting recordings server import");
final Map<Long, Long> folders = new HashMap<>();
@@ -1007,6 +1021,7 @@ public class BackupImport {
/*
* ##################### Import Private Message Folders
*/
+ // public for testing
public void importPrivateMsgFolders(File base) {
log.info("Recording import complete, starting private message folder import");
readList(base, "privateMessageFolder.xml", MSG_FOLDER_LIST_NODE, MSG_FOLDER_NODE, PrivateMessageFolder.class, p -> {
@@ -1152,6 +1167,7 @@ public class BackupImport {
}, true);
}
+ // public for testing
public void importExtraMenus(File base) throws Exception {
log.info("Room files complete, starting extra menus import");
Class<ExtraMenu> eClazz = ExtraMenu.class;
diff --git a/openmeetings-service/src/main/java/org/apache/openmeetings/service/scheduler/ReminderJob.java b/openmeetings-service/src/main/java/org/apache/openmeetings/service/scheduler/ReminderJob.java
index 6167681ec..5b27ce913 100644
--- a/openmeetings-service/src/main/java/org/apache/openmeetings/service/scheduler/ReminderJob.java
+++ b/openmeetings-service/src/main/java/org/apache/openmeetings/service/scheduler/ReminderJob.java
@@ -65,8 +65,8 @@ public class ReminderJob extends AbstractJob {
@Autowired
private GroupUserDao groupUserDao;
- //package private for testing
- Map<Long, LocalDateTime> groupNotifications = new HashMap<>();
+ // public for testing
+ public Map<Long, LocalDateTime> groupNotifications = new HashMap<>();
public void remindMeetings() {
log.trace("ReminderJob.remindMeetings");
diff --git a/openmeetings-util/src/main/java/org/apache/openmeetings/util/OMContextListener.java b/openmeetings-util/src/main/java/org/apache/openmeetings/util/OMContextListener.java
index c89ee9cc4..409de1771 100644
--- a/openmeetings-util/src/main/java/org/apache/openmeetings/util/OMContextListener.java
+++ b/openmeetings-util/src/main/java/org/apache/openmeetings/util/OMContextListener.java
@@ -43,8 +43,8 @@ public class OMContextListener implements ServletContextListener {
System.setProperty(LOG_DIR_PROP, "logs");
}
System.setProperty("webapp.contextPath", String.format("/%s", ctx));
- LoggerContext context = (LoggerContext)LoggerFactory.getILoggerFactory();
try {
+ LoggerContext context = (LoggerContext)LoggerFactory.getILoggerFactory();
JoranConfigurator configurator = new JoranConfigurator();
configurator.setContext(context);
context.reset();
diff --git a/openmeetings-web/src/test/java/org/apache/openmeetings/web/service/mail/TestSubjTemplate.java b/openmeetings-web/src/test/java/org/apache/openmeetings/web/service/mail/TestSubjTemplate.java
index 15f6d8d1d..92f2ce8a3 100644
--- a/openmeetings-web/src/test/java/org/apache/openmeetings/web/service/mail/TestSubjTemplate.java
+++ b/openmeetings-web/src/test/java/org/apache/openmeetings/web/service/mail/TestSubjTemplate.java
@@ -93,7 +93,7 @@ class TestSubjTemplate extends AbstractWicketTesterTest {
private static final long serialVersionUID = 1L;
@Override
- String getPrefix() {
+ public String getPrefix() {
return null;
}
};
diff --git a/openmeetings-web/src/test/java/org/apache/openmeetings/web/test/backup/TestExport.java b/openmeetings-web/src/test/java/org/apache/openmeetings/web/test/backup/TestExport.java
index 4c1c78029..e8df79d66 100644
--- a/openmeetings-web/src/test/java/org/apache/openmeetings/web/test/backup/TestExport.java
+++ b/openmeetings-web/src/test/java/org/apache/openmeetings/web/test/backup/TestExport.java
@@ -25,9 +25,7 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
import java.io.ByteArrayOutputStream;
import java.io.File;
-import java.io.IOException;
import java.io.StringWriter;
-import java.io.Writer;
import java.time.LocalDate;
import javax.xml.bind.JAXBContext;
@@ -63,12 +61,14 @@ class TestExport extends AbstractOmServerTest {
JAXBContext jc = JAXBContext.newInstance(eClazz);
Marshaller marshaller = jc.createMarshaller();
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
+ /* FIXME TODO
marshaller.setProperty(CharacterEscapeHandler.class.getName(), new CharacterEscapeHandler() {
@Override
public void escape(char[] ac, int i, int j, boolean flag, Writer writer) throws IOException {
writer.write(ac, i, j);
}
});
+ */
StringWriter writer = new StringWriter();
marshaller.marshal(u, writer);
Assertions.assertNotNull(writer.getBuffer());
diff --git a/pom.xml b/pom.xml
index d1a31d4b2..db646f52d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -116,8 +116,8 @@
<caldav4j.version>1.0.5</caldav4j.version>
<tika-parsers.version>2.3.0</tika-parsers.version>
<commons-text.version>1.9</commons-text.version>
- <slf4j.version>1.7.36</slf4j.version>
- <logback.version>1.2.11</logback.version>
+ <slf4j.version>2.0.0-alpha7</slf4j.version>
+ <logback.version>1.3.0-alpha14</logback.version>
<jetty.version>9.4.46.v20220331</jetty.version>
<license.excludedScopes>test</license.excludedScopes>
<bcprov-jdk15on.version>1.70</bcprov-jdk15on.version>