In 2019, Jorn added that all `final` fields in classes that reside in the `java.lang` packages are trusted fields in the class `ciFields.cpp`. This would allow us to remove some of the previous checks as they are already covered by the package check.
The package check is: holder->is_in_package("java/lang"))
In addition, the untrusted fields in java.lang.System are all static fields. The special rule for java.lang.System is never useful because it has no untrusted instance field; furthermore, the problematic static fields are already checked before trust_final_non_static_fields is called.
So we should remove:
1. java_lang_System check
2. is_box_klass check
3. java_lang_String check
The package check is: holder->is_in_package("java/lang"))
In addition, the untrusted fields in java.lang.System are all static fields. The special rule for java.lang.System is never useful because it has no untrusted instance field; furthermore, the problematic static fields are already checked before trust_final_non_static_fields is called.
So we should remove:
1. java_lang_System check
2. is_box_klass check
3. java_lang_String check
- caused by
-
JDK-8234049 Implementation of Memory Access API (Incubator)
-
- Resolved
-
- duplicates
-
JDK-8369993 Redundant separate 'String' check in 'trust_final_non_static_fields' ciField.cpp
-
- Closed
-
- links to
-
Commit(master)
openjdk/jdk/df35412d
-
Review(master)
openjdk/jdk/28191