Remove unnecessary char_converter during class loading

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 18
    • Affects Version/s: 17
    • Component/s: hotspot
    • b02

      During class loading, we create a String object from a Symbol, then swap the '/' for '.' characters, and create another String object. Seems wasteful. I noticed this when looking for where we load java.lang.Throwable to throw OOM, and this also throws OOM.
      It still would throw OOM, just not creating two strings in the process.

          Handle s = java_lang_String::create_from_symbol(class_name, CHECK_NULL);
          // Translate to external class name format, i.e., convert '/' chars to '.'
          Handle string = java_lang_String::externalize_classname(s, CHECK_NULL);

      There's another place that does the same thing.

            Assignee:
            Coleen Phillimore
            Reporter:
            Coleen Phillimore
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: