maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hervé Boutemy (JIRA) <j...@apache.org>
Subject [jira] [Updated] (MJAVADOC-488) Latest jdk9 version causes StringIndexOutOfBoundsException
Date Sun, 01 Oct 2017 08:18:00 GMT

     [ https://issues.apache.org/jira/browse/MJAVADOC-488?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Hervé Boutemy updated MJAVADOC-488:
-----------------------------------
    Fix Version/s: 3.0.0-M1
                   3.0.0

> Latest jdk9 version causes StringIndexOutOfBoundsException
> ----------------------------------------------------------
>
>                 Key: MJAVADOC-488
>                 URL: https://issues.apache.org/jira/browse/MJAVADOC-488
>             Project: Maven Javadoc Plugin
>          Issue Type: Bug
>    Affects Versions: 2.10.4
>            Reporter: Andrew Dinn
>            Assignee: Robert Scholte
>             Fix For: 3.0.0, 3.0.0-M1
>
>
> The latest jdk9 releases (9+176) from the Oracle early access program omits the -ea suffix
which was present in previous releases (e.g. 9-ea+170). This is causing the javadoc plugin
to throw a StringIndexOutOfBoundsException under org.apache.commons.lang.SystemUtils.<clinit>().
Here is the relevant exception backtrace:
> {code:java}
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.10.4:jar
(javadoc-jar) on project byteman-root: Execution javadoc-jar of goal org.apache.maven.plugins:maven-javadoc-plugin:2.10.4:jar
failed: An API incompatibility was encountered while executing org.apache.maven.plugins:maven-javadoc-plugin:2.10.4:jar:
java.lang.ExceptionInInitializerError: null
> [WARNING] Error injecting: org.apache.maven.plugin.javadoc.JavadocJar
> java.lang.ExceptionInInitializerError
>         at org.apache.maven.plugin.javadoc.AbstractJavadocMojo.<clinit>(AbstractJavadocMojo.java:195)
>         at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
>         at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
>         . . .
>         at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
>         at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
>         at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
>         at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
> Caused by: java.lang.StringIndexOutOfBoundsException: begin 0, end 3, length 1
>         at java.base/java.lang.String.checkBoundsBeginEnd(String.java:3116)
>         at java.base/java.lang.String.substring(String.java:1885)
>         at org.apache.commons.lang.SystemUtils.getJavaVersionAsFloat(SystemUtils.java:1133)
>         at org.apache.commons.lang.SystemUtils.<clinit>(SystemUtils.java:818)
>         ... 58 more
> {code}
> After stripping the +nnn suffix SystemUtils assumes it has at least 3 characters to play
with (looking at the line number 1133 for the substring call this appears to be version 2.4
that is being linked). It seems that this worked by fluke when the string contained the "-ea"
suffix but it is now thoroughly borked. Perhaps an upgrade to 2.6 might work?



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message