Sandro Martini created PIVOT-855:
------------------------------------
Summary: Compilation errors with Java 7 (JDK 1.7)
Key: PIVOT-855
URL: https://issues.apache.org/jira/browse/PIVOT-855
Project: Pivot
Issue Type: Improvement
Affects Versions: 2.0.2
Reporter: Sandro Martini
Assignee: Sandro Martini
Fix For: 2.1, 2.0.3
As seen in our Continuous Build environment on Jenkins (at Apache), but setup
to use Java 7 (here: https://builds.apache.org/job/Pivot-trunk%20on%20Java%207/
), any build of Pivot sources (from the trunk) now raise some compilation
errors.
Probably some has to be changes even in build.properties and build.xml to let
our CI builds to force 1.7 as Java version (source an target) ... an idea could
be to keep the release if specified in build.properties, otherwise use those in
the current Java version.
Some discussion here:
http://apache-pivot-developers.417237.n3.nabble.com/Compilation-errors-of-Pivot-trunk-with-Java-7-in-Apache-Jenkins-td3973664.html
This is an extract from the generated output:
environment-info:
[echo]
[echo] Compile environment for pivot_build_by_jenkins-2.0.2 is:
[echo] show deprecation true
[echo] debug true
[echo] source 1.6, target 1.6
[echo] encoding UTF-8
[echo] indexJars true
[echo] arg -Xlint
[echo]
[echo] Java environment: home at '/x1/jenkins/tools/java/jdk1.7.0-32/jre',
version 1.7.0
[echo]
core:
[mkdir] Created dir: /x1/jenkins/jenkins-slave/workspace/Pivot-trunk on
Java 7/pivot_trunk/core/ant-bin
[javac] Compiling 133 source files to
/x1/jenkins/jenkins-slave/workspace/Pivot-trunk on Java
7/pivot_trunk/core/ant-bin
[javac] warning: [options] bootstrap class path not set in conjunction with
-source 1.6
[javac] /x1/jenkins/jenkins-slave/workspace/Pivot-trunk on Java
7/pivot_trunk/core/src/org/apache/pivot/xml/Element.java:641: error: name
clash: remove(Node) in Element overrides a method whose erasure is the same as
another method, yet neither overrides the other
[javac] public int remove(Node node) {
[javac] ^
[javac] first method: remove(K) in Dictionary
[javac] second method: remove(T) in Sequence
[javac] where K,V,T are type-variables:
[javac] K extends Object declared in interface Dictionary
[javac] V extends Object declared in interface Dictionary
[javac] T extends Object declared in interface Sequence
[javac] /x1/jenkins/jenkins-slave/workspace/Pivot-trunk on Java
7/pivot_trunk/core/src/org/apache/pivot/xml/Element.java:802: error: name
clash: remove(String) in Element overrides a method whose erasure is the same
as another method, yet neither overrides the other
[javac] public String remove(String attributeName) {
[javac] ^
[javac] first method: remove(T) in Sequence
[javac] second method: remove(K) in Dictionary
[javac] where T,K,V are type-variables:
[javac] T extends Object declared in interface Sequence
[javac] K extends Object declared in interface Dictionary
[javac] V extends Object declared in interface Dictionary
[javac] 2 errors
[javac] 1 warning
BUILD FAILED
/x1/jenkins/jenkins-slave/workspace/Pivot-trunk on Java
7/pivot_trunk/build.xml:474: The following error occurred while executing this
line:
/x1/jenkins/jenkins-slave/workspace/Pivot-trunk on Java
7/pivot_trunk/build.xml:145: Compile failed; see the compiler error output for
details.
Total time: 3 seconds
Build step 'Invoke Ant' marked build as failure
Finished: FAILURE
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira