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

Make new version of JNU_GetStringPlatformChars which checks for null characters

    XMLWordPrintable

Details

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

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: