Robert Munteanu created JCR-4179:
------------------------------------
Summary: Test failures with Java 9 when using
javax.imageio.spi.ServiceRegistry
Key: JCR-4179
URL: https://issues.apache.org/jira/browse/JCR-4179
Project: Jackrabbit Content Repository
Issue Type: Bug
Components: jackrabbit-jcr-client, jackrabbit-jcr-commons,
jackrabbit-spi-commons
Affects Versions: 2.15.5
Environment: Java 9 b181
Reporter: Robert Munteanu
Assignee: Robert Munteanu
Fix For: 2.15.6
When building with Java 9 there is at least one test failure due to using
javax.imageio.spi.ServiceRegistry as a general-purpose service loader, which is
not possible anymore with Java 9:
{noformat}
[ERROR] Tests run: 3, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.13 s
<<< FAILURE! - in org.apache.jackrabbit.commons.JcrUtilsTest
[ERROR] testGetRepository(org.apache.jackrabbit.commons.JcrUtilsTest) Time
elapsed: 0.128 s <<< ERROR!
java.lang.IllegalArgumentException: javax.jcr.RepositoryFactory is not an
ImageIO SPI class
at
org.apache.jackrabbit.commons.JcrUtilsTest.testGetRepository(JcrUtilsTest.java:50){noformat}
We should move away from this ServiceRegistry and use
{{java.util.ServiceLoader}} instead.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)