Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8142832 | emb-9 | Srikanth Adayapalam | P4 | Resolved | Fixed | team |
FULL PRODUCT VERSION :
java version "1.8.0_40"
Java(TM) SE Runtime Environment (build 1.8.0_40-b25)
Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]
A DESCRIPTION OF THE PROBLEM :
Getting compile error
C.java:2: error: name clash: m() in A1 and m() in B1 have the same erasure, yet neither overrides the other
public abstract class C extends A2 implements B2 {
for the following class/interface constellation :
public interface A1 {
A1 m();
}
public abstract class A2 implements A1 {
public abstract A2 m();
}
public interface B1 {
A1 m();
}
public interface B2 extends B1 {
A2 m();
}
public abstract class C extends A2 implements B2 {
}
ADDITIONAL REGRESSION INFORMATION:
java version "1.8.0_40"
Java(TM) SE Runtime Environment (build 1.8.0_40-b25)
Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Compiling the above classes / interfaces
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
compile without any errors
ACTUAL -
C.java:2: error: name clash: m() in A1 and m() in B1 have the same erasure, yet neither overrides the other
public abstract class C extends A2 implements B2 {
ERROR MESSAGES/STACK TRACES THAT OCCUR :
C.java:2: error: name clash: m() in A1 and m() in B1 have the same erasure, yet neither overrides the other
public abstract class C extends A2 implements B2 {
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
public interface A1 {
A1 m();
}
public abstract class A2 implements A1 {
public abstract A2 m();
}
public interface B1 {
A1 m();
}
public interface B2 extends B1 {
A2 m();
}
public abstract class C extends A2 implements B2 {
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
public abstract class C extends A2 implements B2 {
public abstract A2 m();
}
java version "1.8.0_40"
Java(TM) SE Runtime Environment (build 1.8.0_40-b25)
Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]
A DESCRIPTION OF THE PROBLEM :
Getting compile error
C.java:2: error: name clash: m() in A1 and m() in B1 have the same erasure, yet neither overrides the other
public abstract class C extends A2 implements B2 {
for the following class/interface constellation :
public interface A1 {
A1 m();
}
public abstract class A2 implements A1 {
public abstract A2 m();
}
public interface B1 {
A1 m();
}
public interface B2 extends B1 {
A2 m();
}
public abstract class C extends A2 implements B2 {
}
ADDITIONAL REGRESSION INFORMATION:
java version "1.8.0_40"
Java(TM) SE Runtime Environment (build 1.8.0_40-b25)
Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Compiling the above classes / interfaces
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
compile without any errors
ACTUAL -
C.java:2: error: name clash: m() in A1 and m() in B1 have the same erasure, yet neither overrides the other
public abstract class C extends A2 implements B2 {
ERROR MESSAGES/STACK TRACES THAT OCCUR :
C.java:2: error: name clash: m() in A1 and m() in B1 have the same erasure, yet neither overrides the other
public abstract class C extends A2 implements B2 {
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
public interface A1 {
A1 m();
}
public abstract class A2 implements A1 {
public abstract A2 m();
}
public interface B1 {
A1 m();
}
public interface B2 extends B1 {
A2 m();
}
public abstract class C extends A2 implements B2 {
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
public abstract class C extends A2 implements B2 {
public abstract A2 m();
}
- backported by
-
JDK-8142832 Name clash
-
- Resolved
-