You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Closing with no change for reasons cited - latest JLS and latest javac don't call for or enforce this. Should there be a change in future, we will revisit
The following snippet should be rejected by the compler:
because
String
is a the same (or a supertype) of the type of the variablestr
, so this check would always succeed (ifstr != null
).This is mandated by JLS §15.20.2:
The text was updated successfully, but these errors were encountered: