[
https://issues.apache.org/jira/browse/AMBARI-12134?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14603430#comment-14603430
]
Jonathan Halterman commented on AMBARI-12134:
---------------------------------------------
For the record: Currently, javac will happily compile code targeted towards 1.6
even if it uses 1.7 APIs so long as the JDK doing the compilation supports 1.7.
But if/when that code is executed, you'll get an error like:
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
The method compare(boolean, boolean) is undefined for the type Boolean
When this line of code is hit:
https://github.com/apache/ambari/blob/d68783254af98f0e9a5c57f171a7c335331e4544/ambari-server/src/main/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java#L186
> Update poms to target 1.7 and 1.6 JREs
> --------------------------------------
>
> Key: AMBARI-12134
> URL: https://issues.apache.org/jira/browse/AMBARI-12134
> Project: Ambari
> Issue Type: Bug
> Affects Versions: 2.1.0
> Reporter: Jonathan Halterman
> Assignee: Jonathan Halterman
> Fix For: 2.1.0
>
> Attachments: AMBARI-12134-3.patch
>
>
> The ambari parent pom is targeted towards Java 1.6 while ambari uses 1.7
> APIs. The ambari metrics pom is targeted at java 1.5 (by default) while
> ambari-metrics uses 1.6 APIs. This causes basic compilation failures,
> depending on how you build the projects and what tools you use to work on
> them. AFAIK Ambari 2.1 and beyond are targeted at 1.7, so the Java versions
> in the POMs should be updated to reflect this.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)