-
Enhancement
-
Resolution: Fixed
-
P4
-
None
ClassFile
API Preview PR comment from [~mcimadamore]:
It is not clear to me as to whether all the methods in the API deal with null correctly. What we did for FFM, assuming that the classfile API is also null-hostile by default, was to add a single test which would try to call all API methods and looking for NPEs:
jdk/test/jdk/java/foreign/TestNulls.java
Line 80 in 2637e8d
public class TestNulls {
This test has saved us many times when adding/changing API methods.
One example is `Utf8Entry.equalsString`, not null-hostile if it's already string-expanded.
API Preview PR comment from [~mcimadamore]:
It is not clear to me as to whether all the methods in the API deal with null correctly. What we did for FFM, assuming that the classfile API is also null-hostile by default, was to add a single test which would try to call all API methods and looking for NPEs:
jdk/test/jdk/java/foreign/TestNulls.java
Line 80 in 2637e8d
public class TestNulls {
This test has saved us many times when adding/changing API methods.
One example is `Utf8Entry.equalsString`, not null-hostile if it's already string-expanded.
- duplicates
-
JDK-8336430 Inconsistent NPE behaviour of `Utf8Entry::equalsString`
-
- Closed
-
- relates to
-
JDK-8339344 Fix NullPointerException in ModuleRequireInfo after adding null check
-
- Closed
-
-
JDK-8341998 General API contract test for the ClassFile API
-
- Open
-
- links to
-
Commit(master) openjdk/jdk/a2c77522
-
Review(master) openjdk/jdk/20556
-
Review(master) openjdk/jdk/21458
(1 links to)