Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.2
-
None
Description
The current service loader code used by LogFactory predates the ServiceLoader class introduced in Java 6 by 4 years and is a simplified version of it.
This has many disadvantages:
- the service loader file can not have any comments, like a license header or the name of the tool that generated the service file. Commons Logging just takes the first line in the file and uses it as the class name,
- the Service Loader Mediator OSGi specification allows to use ServiceLoader in an OSGi environment, but it might ignore direct accesses to META-INF/services resources (cf. Apache Aries SPI Fly),
- in a JPMS environment, the META-INF/services file could even not be there and the service is declared in the module descriptor.
Attachments
Issue Links
- links to