One potential bug: The switch statement in Infer.java mentions tags TYPECAST and EXEC.
It should probably mention PARENS also, if only to assert that env. expressions of that sort don't appear. Otherwise we could get confusion some day about the meaning of this code:
String s = (String)( mh.invokeExact() );
It should be the same as this code:
String s = (String) mh.invokeExact();
But the switch statement might make it act like this:
String s = (Object)( mh.invokeExact() );
It should probably mention PARENS also, if only to assert that env. expressions of that sort don't appear. Otherwise we could get confusion some day about the meaning of this code:
String s = (String)( mh.invokeExact() );
It should be the same as this code:
String s = (String) mh.invokeExact();
But the switch statement might make it act like this:
String s = (Object)( mh.invokeExact() );
- relates to
-
JDK-6992698 JSR 292: remove support for transient syntax in polymorphic signature calls
- Closed