JDK-7151802 : compiler update caused sqe test failed
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 8
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2012-03-07
  • Updated: 2012-03-19
  • Resolved: 2012-03-19
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8 b30Fixed
Related Reports
Relates :  
Description
Core/libs test failed
Testname
===============================
java_util/EnumSet/EnumSetTest
===============================
Problem, compile error with
[2012-03-07T04:29:41.60] ${JAVAC}  ${JAVAC_OPTS} -d ${test_work_dir} ${test_work_dir}/EnumSetTest.java
[2012-03-07T04:29:41.60] # Actual: /Users/aurora/sandbox/jdk/bin/javac -d /Users/aurora/sandbox/results/ResultDir/EnumSetTest /Users/aurora/sandbox/results/ResultDir/EnumSetTest/EnumSetTest.java
[2012-03-07T04:29:41.60] /Users/aurora/sandbox/results/ResultDir/EnumSetTest/EnumSetTest.java:697: error: incompatible types
[2012-03-07T04:29:42.52]              EnumSet<T> newSetJan = EnumSet.range(enumArrayMonth[0],enumArrayMonth[0]);
[2012-03-07T04:29:42.52]                                                  ^
[2012-03-07T04:29:42.52]   required: EnumSet<T>
[2012-03-07T04:29:42.52]   found:    EnumSet<Enum>
[2012-03-07T04:29:42.52]   where T is a type-variable:

Source code is

695             Enum [] enumArrayMonth = enumClass.getEnumConstants();
696             EnumSet<T> newSetJan = EnumSet.range(enumArrayMonth[0],enumArrayMonth[0]);
697             EnumSet<T> complementOfNewSetJan = EnumSet.complementOf(newSetJan);

And the other failed test is
class Foo<X extends Foo<X>> {
  static <Z extends Foo<Z>> Foo<Z> get(Z fz) { return null; }

<U extends Foo<U>> void test(Foo foo) {
      Foo<U> fs = Foo.get(foo);
  }
}

Comments
EVALUATION Problem is that 7144506 erroneously changed the way in which the compiler deals with unchecked method conversion. As inference is structured as two separate steps (15.12.2.7/15.12.2.8), only the first step must be performed if unchecked conversion arises - the second step must be discarded in that case.
09-03-2012