-
Type:
Enhancement
-
Resolution: Rejected
-
Priority:
P4
-
None
-
Affects Version/s: 7
-
Component/s: tools
-
generic
-
generic
CR 6978122 provides an example in which the user is surprised that "if (a = null) ___" compiles when a has type Boolean. Mistaking "=" for "==" is a common error, and the use of the former in a condition is almost always a mistake. It would be useful to provide a lint warning for such cases (both where the type is Boolean and the type is boolean).
Note that Eclipse has such a warning.
Note that Eclipse has such a warning.
- relates to
-
JDK-6978122 Null Check for Boolean Object Types
-
- Closed
-