Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8318486

Rename JavaLangAccess.xxNoRepl to xxReportError

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P5 P5
    • None
    • None
    • core-libs
    • None

      JavaLangAccess::xxNoRepl methods have their NoRepl suffix changed to ReportError.

      NoRepl can be incorrectly interpreted as "no replication", which is not what these APIs are for. They instead expose the report-error coding error action fast paths in String, allowing ZipCoder to quickly throw encoding exceptions wrapped in IllegalArgumentException.

      In addition, newStringNoRepl and getBytesNoRepl in JavaLangAccess can be used to avoid copying arrays for trusted usages. They should not be used so and such Latin-1 string creation should be done with a different internal API.

            liach Chen Liang
            liach Chen Liang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: