FULL PRODUCT VERSION :
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Linux mavant-linux 3.2.0-97-generic #137-Ubuntu SMP Thu Dec 17 18:11:47 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
Darwin mavant-mbp 14.5.0 Darwin Kernel Version 14.5.0: Tue Sep 1 21:23:09 PDT 2015; root:xnu-2782.50.1~1/RELEASE_X86_64 x86_64
A DESCRIPTION OF THE PROBLEM :
When a class implements two interfaces which specify override-equivalent methods which throw exceptions, the the exception is incorrectly erased from the method signature of the implementing class.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
public class T {
interface S1 {
<K extends Exception> void run(Class<K> clazz) throws K;
}
interface S2 {
<K extends Exception> void run(Class<K> clazz) throws K;
}
interface S extends S1, S2 {}
public void foo(S s) {
s.run(java.io.IOException.class);
}
}
---------- END SOURCE ----------
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Linux mavant-linux 3.2.0-97-generic #137-Ubuntu SMP Thu Dec 17 18:11:47 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
Darwin mavant-mbp 14.5.0 Darwin Kernel Version 14.5.0: Tue Sep 1 21:23:09 PDT 2015; root:xnu-2782.50.1~1/RELEASE_X86_64 x86_64
A DESCRIPTION OF THE PROBLEM :
When a class implements two interfaces which specify override-equivalent methods which throw exceptions, the the exception is incorrectly erased from the method signature of the implementing class.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
public class T {
interface S1 {
<K extends Exception> void run(Class<K> clazz) throws K;
}
interface S2 {
<K extends Exception> void run(Class<K> clazz) throws K;
}
interface S extends S1, S2 {}
public void foo(S s) {
s.run(java.io.IOException.class);
}
}
---------- END SOURCE ----------