-
Bug
-
Resolution: Fixed
-
P3
-
9
-
b153
-
Not verified
The fix for JDK-8171981 brought in JEP-286 code. A problem with the use of == was noted and traced to the use of .stream().map(...).collect(...) on a List. These lists are javac lists not java.util lists and == is a common usage but requires that .map be used instead. This was fixed in the commit for JDK-8171981.
However, there was a second use of .stream().map(...).collect(...) with == which was not corrected.
Type outer = t.getEnclosingType();
Type outer1 = visit(outer, upward);
List<Type> typarams = t.getTypeArguments();
List<Type> typarams1 = typarams.stream()
.map(ta -> mapTypeArgument(ta, upward))
.collect(List.collector());
if (typarams1.stream().anyMatch(ta -> ta.hasTag(BOT))) {
//not defined
return syms.botType;
}
if (outer1 == outer && typarams1 == typarams) return t;
This bug is to fix that usage.
However, there was a second use of .stream().map(...).collect(...) with == which was not corrected.
Type outer = t.getEnclosingType();
Type outer1 = visit(outer, upward);
List<Type> typarams = t.getTypeArguments();
List<Type> typarams1 = typarams.stream()
.map(ta -> mapTypeArgument(ta, upward))
.collect(List.collector());
if (typarams1.stream().anyMatch(ta -> ta.hasTag(BOT))) {
//not defined
return syms.botType;
}
if (outer1 == outer && typarams1 == typarams) return t;
This bug is to fix that usage.
- relates to
-
JDK-8171981 JShell: Fails compilation: new Object().getClass().getSuperclass()
-
- Closed
-