jimblackler / jsonschemafriend

A JSON Schema loader and validator, delivered as a Java library.
Apache License 2.0
48 stars 23 forks source link

Migrate AddressException from javax.mail to jakarta in FormatChecker.java #16

Open ghost opened 2 years ago

ghost commented 2 years ago

As you may know the package javax.mail has not been updated for a while (Maven Central shows last release in 2018), more and more projects are migrating over to Jakarta. In FormatChecker an AddressException from javax.mail is being used, which is causing problems if software already has moved on to use Jakarta. The following exception is being thrown: Exception in thread "main" java.lang.NoClassDefFoundError: javax/mail/internet/AddressException It would be appreciated, if you could migrate onto newer library.

cardamon commented 2 years ago

As far as I can see, FormatChecker has undergone some work and no longer seems to be using said exception. In fact, is it possible the entire com.sun.mail:javax.mail artifact is no longer used, ie. can this line: https://github.com/jimblackler/jsonschemafriend/blob/4d753871d2e71782b170865cf8fcbf29a94e53b4/library/build.gradle#L50 simply be removed?

jimblackler commented 2 years ago

Yep. Thanks all.

https://github.com/jimblackler/jsonschemafriend/commit/f7d59a0a69d156d79f1c0051013adb3550c0f3a2