-
Enhancement
-
Resolution: Fixed
-
P4
-
None
-
b54
-
Not verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8085352 | emb-9 | Maurizio Cimadamore | P4 | Resolved | Fixed | team |
This issue is similar to JDK-8073479, but applies to langtools.
A few places in our class library use the weird trick of using object.getClass() to check for nullity.
While this make seem a smart move, it actually confuses people into believing this is an approved
practice of null checking.
With JDK 7, we have Objects.requireNonNull that provide the proper null checking, and declare the
intent properly.
A few places in our class library use the weird trick of using object.getClass() to check for nullity.
While this make seem a smart move, it actually confuses people into believing this is an approved
practice of null checking.
With JDK 7, we have Objects.requireNonNull that provide the proper null checking, and declare the
intent properly.
- backported by
-
JDK-8085352 java* tools: replace obj.getClass hacks with Assert.checkNonNull or Objects.requireNonNull
-
- Resolved
-
- relates to
-
JDK-8073479 Replace obj.getClass hacks with Objects.requireNonNull
-
- Resolved
-
-
JDK-7041258 Use j.u.Object.requireNonNull in the JDK codebase
-
- Closed
-