Remove redundant checks in ciField.cpp

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P5
    • 26
    • Affects Version/s: 26
    • Component/s: hotspot
    • master

      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

            Assignee:
            Tobias Hartmann
            Reporter:
            Per-Ake Minborg
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: