Skip to content

Custom mail providers distributed under META-INF/javamail.properties are no longer loaded with Jakarta Mail 2.1.5 #812

@yersan

Description

@yersan

Describe the bug
Jakarta Mail 2.1.5 is not backward compatible with how custom providers distributed by the application are loaded. Providers declared under META-INF/javamail.properties are no longer loaded; users are now forced to rename the file to META-INF/jakarta.properties instead. I understand it as a backward compatibility issue.

To Reproduce
See reproducer attached to this issue, it is just a test case that loads the session and tries to assert that the custom providers declared on META-INF/javamail.properties are available from Session.getProviders()

mail-reproducer.zip

Expected behavior
Custom providers distributed via META-INF/javamail.properties are loaded.

Additional context
This issue was introduced via here. As soon as the providers coming from the META-INF/jakarta.properties that are available on the classloader via Angus Mail are processed, the for loop is broken and the code skips processing other possible providers distributed by the application via META-INF/javamail.properties

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions