livem / jain-sip

Automatically exported from code.google.com/p/jain-sip
0 stars 0 forks source link

Compiling -jain-sip-release-1.2.228 with java8 fails #150

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Download jain-sip-jain-sip-release-1.2.228
2. Open a terminal window/command line, set ANT_HOME properly, then set 
JAVA_HOME to a java8 jdk (for example jdk1.8.0_25)
3. ant all

What is the expected output? 
Successful compilaton

What do you see instead?
[jain-javac] 
jain-sip-jain-sip-release-1.2.228\src\gov\nist\core\MultiMap.java:35: error: 
remove(Object,Object) in MultiMap clashes with remove(Object,Object) in Map
[jain-javac]     public Object remove( Object key, Object item );
[jain-javac]                   ^
[jain-javac]   return type Object is not compatible with boolean
[jain-javac] Note: Some input files use or override a deprecated API.
[jain-javac] Note: Recompile with -Xlint:deprecation for details.
[jain-javac] Note: Some input files use unchecked or unsafe operations.
[jain-javac] Note: Recompile with -Xlint:unchecked for details.
[jain-javac] 1 error
[jain-javac] 4 warnings

What version of the product are you using? 
1.2.228

On what operating system?
Windows 7 64 bit

Please provide any additional information below.
Compile works with java7. I think the issue happens because in java8 there is a 
new remove(Object key, Object value) method in java.util.Map , and its return 
value type crushes with gov.nist.core.MultiMap's return value type. I think the 
2 methods internal functionality is different, so a rename/refactor might be 
required in gov.nist.core.MultiMap.

Original issue reported on code.google.com by istvan.k...@gmail.com on 14 Jan 2015 at 10:47