-
Bug
-
Resolution: Fixed
-
P3
-
6u29
FULL PRODUCT VERSION :
java version "1.6.0_30"
Java(TM) SE Runtime Environment (build 1.6.0_30-b12)
Java HotSpot(TM) Client VM (build 20.5-b03, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7600]
A DESCRIPTION OF THE PROBLEM :
I have a java interface hierarchy that compiled prior to 1.6v30, and it no longer compiles.
REGRESSION. Last worked in version 6u29
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
I have a small set of interfaces to reproduce the problem
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
To compile successfully
ACTUAL -
reference to getObject is ambiguous, both method getObject() in test.jcb.TestInterface3b and method getObject() in test.jcb.TestInterface3b match
ERROR MESSAGES/STACK TRACES THAT OCCUR :
reference to getObject is ambiguous, both method getObject() in test.jcb.TestInterface3b and method getObject() in test.jcb.TestInterface3b match
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
I have source, but it is several interfaces. Not sure how to attach it:
public interface RetInterface1{}
public interface RetInterface2 extends RetInterface1 {}
public interface TestInterface extends TestInterface1a, TestInterface2a, TestInterface3a{}
public interface TestInterface1a extends TestInterface1b{}
public interface TestInterface1b extends TestInterface1c
{
RetInterface2 getObject();
}
public interface TestInterface1c
{
RetInterface1 getObject();
}
public interface TestInterface2a extends TestInterface1b, TestInterface2b, TestInterface3b{}
public interface TestInterface2b extends TestInterface3c // if you comment out this extends, it compiles fine
{
}
public interface TestInterface3a extends TestInterface3b{}
public interface TestInterface3b extends TestInterface3c
{
RetInterface2 getObject();
}
public interface TestInterface3c
{
RetInterface1 getObject();
}
public class TestClass
{
public static void main(String[] args)
{
TestInterface testIntf = new TestInterface()
{
public RetInterface2 getObject()
{
return null;
}
};
testIntf.getObject();
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
No work around
java version "1.6.0_30"
Java(TM) SE Runtime Environment (build 1.6.0_30-b12)
Java HotSpot(TM) Client VM (build 20.5-b03, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7600]
A DESCRIPTION OF THE PROBLEM :
I have a java interface hierarchy that compiled prior to 1.6v30, and it no longer compiles.
REGRESSION. Last worked in version 6u29
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
I have a small set of interfaces to reproduce the problem
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
To compile successfully
ACTUAL -
reference to getObject is ambiguous, both method getObject() in test.jcb.TestInterface3b and method getObject() in test.jcb.TestInterface3b match
ERROR MESSAGES/STACK TRACES THAT OCCUR :
reference to getObject is ambiguous, both method getObject() in test.jcb.TestInterface3b and method getObject() in test.jcb.TestInterface3b match
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
I have source, but it is several interfaces. Not sure how to attach it:
public interface RetInterface1{}
public interface RetInterface2 extends RetInterface1 {}
public interface TestInterface extends TestInterface1a, TestInterface2a, TestInterface3a{}
public interface TestInterface1a extends TestInterface1b{}
public interface TestInterface1b extends TestInterface1c
{
RetInterface2 getObject();
}
public interface TestInterface1c
{
RetInterface1 getObject();
}
public interface TestInterface2a extends TestInterface1b, TestInterface2b, TestInterface3b{}
public interface TestInterface2b extends TestInterface3c // if you comment out this extends, it compiles fine
{
}
public interface TestInterface3a extends TestInterface3b{}
public interface TestInterface3b extends TestInterface3c
{
RetInterface2 getObject();
}
public interface TestInterface3c
{
RetInterface1 getObject();
}
public class TestClass
{
public static void main(String[] args)
{
TestInterface testIntf = new TestInterface()
{
public RetInterface2 getObject()
{
return null;
}
};
testIntf.getObject();
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
No work around