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

Make new version of JNU_GetStringPlatformChars which checks for null characters

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 21
    • None
    • core-libs
    • None
    • b25

      JNU_GetStringPlatformChars needs to check for null characters which are allowed in Java Strings but not in native strings. IllegalArgumentException should be thrown as a fallback. Probably, strings should be checked before calling this function so more specific action should be taken.

      A new native function JNU_GetStringPlatformCharsStrict will be added which will be documented to throw IllegalArgumentException
      if the returned string contains null characters. Separate PRs will be required to change existing code to use this new function.

            michaelm Michael McMahon
            michaelm Michael McMahon
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: