jakartaee / mail-api

Jakarta Mail Specification project
https://jakartaee.github.io/mail-api
Other
240 stars 100 forks source link

Proposed workaround to the jakarta.mail.util.StreamProvider #702

Closed vionta closed 6 months ago

vionta commented 7 months ago

Currently, when the instantiation of the StreamProvider Implementation fails using the Thread Context Class Loader, there's no fallback to the newInstance on the App Class Loader. This is a proposed workaround, that allows to load the StreamProvider implementation class indicating the explicit class name (Declaration example under this line): System.setProperty("jakarta.mail.util.StreamProvider","org.eclipse.angus.mail.util.MailStreamProvider");

jmehrens commented 7 months ago

I think I have this case covered in https://github.com/jakartaee/mail-api/pull/701

vionta commented 7 months ago

Hi, I made a specific test on the environment and code from https://github.com/jakartaee/mail-api/pull/701 seems to work.

jmehrens commented 6 months ago

@vionta That is great news! I'm holding off on merging #701 until I complete the matching PR for Activation.