[ 
https://issues.apache.org/jira/browse/HADOOP-14586?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16066524#comment-16066524
 ] 

Allen Wittenauer commented on HADOOP-14586:
-------------------------------------------

bq. using the core libs for client-side operation is something more realistic 
as an initial deliverable. 

Understood, but if you look at the list of things that we know are broken when 
running under JDK9 (even the client-side bits),  they are never likely to get 
fully fixed in 2.7.  It's very misleading to downstream to indicate that JDK9 
will ever fully work properly with 2.7, and maybe even 2.8 or 2.9.  Especially 
when considering the release rate for branch-2....

>  org.apache.hadoop.util.Shell in 2.7 breaks <clinit> on Java 9 RC build; 
> backport HADOOP-10775 to 2.7.x
> -------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-14586
>                 URL: https://issues.apache.org/jira/browse/HADOOP-14586
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: common
>    Affects Versions: 2.7.2
>         Environment: Java 9, build 175 (Java 9 release candidate as of June 
> 25th, 2017)
>            Reporter: Uwe Schindler
>            Assignee: Akira Ajisaka
>            Priority: Minor
>              Labels: Java9
>         Attachments: HADOOP-14586-branch-2.7-01.patch, 
> HADOOP-14586-branch-2.7-02.patch
>
>
> You cannot use any pre-Hadoop 2.8 component anymore with the latest release 
> candidate build of Java 9, because it fails with an 
> StringIndexOutOfBoundsException in {{org.apache.hadoop.util.Shell#<clinit>}}. 
> This leads to a whole cascade of failing classes (next in chain is 
> StringUtils).
> The reason is that the release candidate build of Java 9 no longer has "-ea" 
> in the version string and the system property "java.version" is now simply 
> "9". This causes the following line to fail fatally:
> {code:java}
>   private static boolean IS_JAVA7_OR_ABOVE =
>       System.getProperty("java.version").substring(0, 3).compareTo("1.7") >= 
> 0;
> {code}
> Analysis:
> - This code looks wrong, as comparing a version this way is incorrect.
> - The {{substring(0, 3)}} is not needed, {{compareTo}} also works without it, 
> although it is still an invalid way to compare a version.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to