You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2014/04/07 23:20:57 UTC

[Bug 56360] New: HashTree and ListedHashTree fail to compile with Java 8

https://issues.apache.org/bugzilla/show_bug.cgi?id=56360

            Bug ID: 56360
           Summary: HashTree and ListedHashTree fail to compile with Java
                    8
           Product: JMeter
           Version: 2.11
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main
          Assignee: issues@jmeter.apache.org
          Reporter: ebourg@apache.org

HashTree and ListedHashTree in the org.apache.jorphan.collections package fail
to compile with Java 8 due to a conflict with the newly added Map.replace(K,V)
method:

compile-jorphan:
    [javac] Compiling 55 source files to C:\dev\apache\jmeter\build\jorphan
    [javac] warning: [options] bootstrap class path not set in conjunction with
-source 1.6
    [javac]
C:\dev\apache\jmeter\src\jorphan\org\apache\jorphan\collections\HashTree.java:766:
error: name clash: replace(Object,Object) in HashTree and replace(K,V) in Map
have the same erasure, yet neither overrides the other
    [javac]     public void replace(Object currentKey, Object newKey) {
    [javac]                 ^
    [javac]   where K,V are type-variables:
    [javac]     K extends Object declared in interface Map
    [javac]     V extends Object declared in interface Map
    [javac]
C:\dev\apache\jmeter\src\jorphan\org\apache\jorphan\collections\ListedHashTree.java:119:
error: name clash: replace(Object,Object) in ListedHashTree and replace(K,V) in
Map have the same erasure, yet neither overrides the other
    [javac]     public void replace(Object currentKey, Object newKey) {
    [javac]                 ^
    [javac]   where K,V are type-variables:
    [javac]     K extends Object declared in interface Map
    [javac]     V extends Object declared in interface Map
    [javac] Note:
C:\dev\apache\jmeter\src\jorphan\org\apache\jorphan\gui\JLabeledChoice.java
uses unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 2 errors
    [javac] 1 warning

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 56360] HashTree and ListedHashTree fail to compile with Java 8

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56360

--- Comment #3 from Emmanuel Bourg <eb...@apache.org> ---
Here is the patch applied in Debian fixing this issue (for JMeter 2.8)

http://anonscm.debian.org/viewvc/pkg-java/trunk/jakarta-jmeter/debian/patches/04_java8_compatibility.patch?view=co

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 56360] HashTree and ListedHashTree fail to compile with Java 8

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56360

--- Comment #1 from Sebb <se...@apache.org> ---
JMeter currently targets Java 1.6

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 56360] HashTree and ListedHashTree fail to compile with Java 8

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56360

--- Comment #2 from Emmanuel Bourg <eb...@apache.org> ---
This is problematic for Debian where JMeter is compiled from the sources. This
blocks the transition to Java 8 as the default JDK.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 56360] HashTree and ListedHashTree fail to compile with Java 8

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56360

Sebb <se...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Sebb <se...@apache.org> ---
Thanks for the patch etc.

Fixed:

URL: http://svn.apache.org/r1586693
Log:
HashTree and ListedHashTree fail to compile with Java 8
Rename replace as replaceKey to avoid clash with Java 8 Map.replace(K,V) mew
method
Bugzilla Id: 56360

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/JMeter.java
    jmeter/trunk/src/core/org/apache/jmeter/engine/ConvertListeners.java
    jmeter/trunk/src/core/org/apache/jmeter/gui/action/Save.java
    jmeter/trunk/src/jorphan/org/apache/jorphan/collections/HashTree.java
    jmeter/trunk/src/jorphan/org/apache/jorphan/collections/ListedHashTree.java
   
jmeter/trunk/src/reports/org/apache/jmeter/report/gui/action/ReportSave.java
    jmeter/trunk/xdocs/changes.xml

-- 
You are receiving this mail because:
You are the assignee for the bug.