-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
-
None
-
generic
-
generic
A DESCRIPTION OF THE PROBLEM :
Service provider mechanism is inconsistent when used with module-info.java and META-INF/resources and docs of ServiceLoader does not explain why.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create Service and Provider for this service in a single project.
When modules are used and provider is declared in module-info.java everything works fine.
When provider is declared in META-INF/services the provider is not discovered.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Consistent behaviour in both cases and explanation in ServiceLoader documentation.
ACTUAL -
Different behaviour in both cases.
---------- BEGIN SOURCE ---------
See attached zip file.
---------- END SOURCE ----------
FREQUENCY : always
Service provider mechanism is inconsistent when used with module-info.java and META-INF/resources and docs of ServiceLoader does not explain why.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create Service and Provider for this service in a single project.
When modules are used and provider is declared in module-info.java everything works fine.
When provider is declared in META-INF/services the provider is not discovered.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Consistent behaviour in both cases and explanation in ServiceLoader documentation.
ACTUAL -
Different behaviour in both cases.
---------- BEGIN SOURCE ---------
See attached zip file.
---------- END SOURCE ----------
FREQUENCY : always