kinow commented on code in PR #107: URL: https://github.com/apache/commons-configuration/pull/107#discussion_r869852144
########## src/test/java/org/apache/commons/configuration2/TestDataConfiguration.java: ########## @@ -73,10 +73,13 @@ private static Date expectedDate() throws ParseException { /** * Create an instance of InternetAddress. This trick is necessary to compile and run the test with Java 1.3 and the - * javamail-1.4 which is not compatible with Java 1.3 + * javamail-1.4 which is not compatible with Java 1.3. + * + * <p>javamail-2.0 had a namespace change, moving javax.mail.* to jakarta.mail.*. This test verifies if we have + * javax.mail.* in the classpath before trying the Jakarta classes.</p> */ private Object createInternetAddress(final String email) throws Exception { - final Class<?> cls = Class.forName("javax.mail.internet.InternetAddress"); + final Class<?> cls = Class.forName("jakarta.mail.internet.InternetAddress"); Review Comment: No, only the Jakarta path. I started modifying the test to create a test object using javax.mail too, but then I couldn't find a clear way to load the javax.mail into the classpath. `mailapi` has a different package structure for the mail part, but it also has a common `com.sun.mail` part… Adding two versions of the `mailapi` results in only the last dependency being added by Maven, and doesn't really sound like a good idea. Maybe we should leave it as it is until we decide to drop javax.mail and support only jakarta.mail, or leave it untested? Or maybe there's some other way to test with different dependencies (never had to do that). WDYT? ![image](https://user-images.githubusercontent.com/304786/167767328-8638a868-6cc9-41cd-b408-ee637a0aabd3.png) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org