Redundant separate 'String' check in 'trust_final_non_static_fields' ciField.cpp

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P5
    • tbd
    • Affects Version/s: 26
    • Component/s: hotspot

      In JDK-8234049 code was updated to trust all classes from 'java/lang' package.

        if (holder->is_in_package("java/lang/invoke") || holder->is_in_package("sun/invoke") ||
            holder->is_in_package("java/lang/reflect") || holder->is_in_package("jdk/internal/reflect") ||
            holder->is_in_package("jdk/internal/foreign/layout") || holder->is_in_package("jdk/internal/foreign") ||
            holder->is_in_package("jdk/internal/vm/vector") || holder->is_in_package("jdk/incubator/vector") ||
            holder->is_in_package("java/lang"))
          return true;

      It means separate String check now is not needed.

        if (holder->name() == ciSymbols::java_lang_String())
          return true;

            Assignee:
            Unassigned
            Reporter:
            Andrey Turbanov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: