-
Bug
-
Resolution: Fixed
-
P4
-
11.0.4, 16
-
b23
-
x86_64
-
os_x
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8315857 | 17.0.10-oracle | Weibing Xiao | P4 | Resolved | Fixed | b01 |
JDK-8316349 | 17.0.10 | Goetz Lindenmaier | P4 | Resolved | Fixed | b01 |
JDK-8317320 | 17.0.9.0.1-oracle | Weibing Xiao | P4 | Resolved | Fixed | b01 |
JDK-8316023 | 17.0.8.0.2-oracle | Weibing Xiao | P4 | Closed | Fixed | b01 |
JDK-8315874 | 11.0.22-oracle | Weibing Xiao | P4 | Resolved | Fixed | b01 |
JDK-8317879 | 11.0.22 | Andrew Lu | P4 | Resolved | Fixed | b01 |
JDK-8317520 | 11.0.21.0.1-oracle | Ryan Wallace | P4 | Closed | Fixed | b01 |
In Java 11 when i try to compile code sometimes it compiles, sometimes it fails.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Compile couple times
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Success compilation
ACTUAL -
Error:(10, 58) java: incompatible types: inferred type does not conform to equality constraint(s)
inferred: java.util.List<Main.A<?,?>>
equality constraints(s): java.util.List<capture#1 of ? extends Main.A<?,?>>
---------- BEGIN SOURCE ----------
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
public class Main {
public static void main(String[] args) {
List<? extends A<?, ?>> a = new LinkedList<>();
Map<String, List<A<?, ?>>> b = a.stream().collect(
Collectors.groupingBy(A::getval, Collectors.toList())
);
System.out.println("Hello World!");
}
class A<K, V> {
String getval() {
return "sss";
}
}
}
---------- END SOURCE ----------
FREQUENCY : often
- backported by
-
JDK-8315857 Javac inferred type does not conform to equality constraint
- Resolved
-
JDK-8315874 Javac inferred type does not conform to equality constraint
- Resolved
-
JDK-8316349 Javac inferred type does not conform to equality constraint
- Resolved
-
JDK-8317320 Javac inferred type does not conform to equality constraint
- Resolved
-
JDK-8317879 Javac inferred type does not conform to equality constraint
- Resolved
-
JDK-8316023 Javac inferred type does not conform to equality constraint
- Closed
-
JDK-8317520 Javac inferred type does not conform to equality constraint
- Closed
- relates to
-
JDK-8046685 Uncompilable large expressions involving generics.
- Closed
-
JDK-8324860 javac fails to compile code after JDK-8232933
- Open
- links to
-
Commit openjdk/jdk11u-dev/a75f34ff
-
Commit openjdk/jdk17u-dev/af9d522e
-
Commit openjdk/jdk/7a85441a
-
Review openjdk/jdk11u-dev/2170
-
Review openjdk/jdk17u-dev/1730
-
Review openjdk/jdk/10897