Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StreamProvider not static and OSGi support #579

Merged
merged 2 commits into from
Nov 2, 2021

Conversation

jbescos
Copy link
Member

@jbescos jbescos commented Sep 13, 2021

StreamProvider is supposed to be implemented by different implementations, and it was instanced one time in a static variable.

This could be a problem in server containers, because only one instance would exist. It could happen that it is loaded as com.sun.mail, and later an application with other implementation is deployed. In this case, this application would still use com.sun.mail.

Signed-off-by: Jorge Bescos Gascon <jorge.bescos.gascon@oracle.com>
@jbescos jbescos marked this pull request as draft November 1, 2021 08:16
@jbescos jbescos changed the title StreamProvider is not static StreamProvider not static and OSGi support Nov 1, 2021
Signed-off-by: Jorge Bescos Gascon <jorge.bescos.gascon@oracle.com>
@jbescos jbescos marked this pull request as ready for review November 1, 2021 10:27
Class<T> clazz = null;
try {
if (classLoader == null) {
clazz = (Class<T>) Class.forName(className);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unchecked cast... add appropriate suppresswarnings....

Copy link
Contributor

@lukasj lukasj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with activation-api 2.1.0-RC2 needs angus-activation at test scope (or some dummy impl probably...) to build

Copy link
Contributor

@lukasj lukasj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll fix outstanding minor things myself in the next PR

@basil
Copy link

basil commented Mar 10, 2023

Causes downstream problems for Jenkins: #665

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants