-
Bug
-
Resolution: Fixed
-
P3
-
1.4.2, 5.0
-
b28
-
generic, x86
-
solaris_8, windows_xp
Existing code such as
Class a = boolean ? A.class : B.class;
should compile without error, in spite of the fact that (with generics
enabled) neither A.class nor B.class is a subtype of the other. With
wildcards, the result type should be
Class<?>
Or, if A is a base class of B,
Class<? extends A>
This is a backward compatibility issue.
Class a = boolean ? A.class : B.class;
should compile without error, in spite of the fact that (with generics
enabled) neither A.class nor B.class is a subtype of the other. With
wildcards, the result type should be
Class<?>
Or, if A is a base class of B,
Class<? extends A>
This is a backward compatibility issue.
- duplicates
-
JDK-4952864 javac problems in conditional operator on reference type values
-
- Closed
-
-
JDK-4952888 javac problems in conditional operator with different reference types
-
- Closed
-
-
JDK-5047104 tertiary operator drawback: an explicit cast is required.
-
- Closed
-