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

Use the raw methods of java.net.URI when possible

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • None
    • core-libs
    • None
    • b100
    • generic
    • generic

      URI.getArgument() will return null if and only if URI.getRawArgument() returns null. Same for the empty string.

      The raw methods avoids additional volatile loads, thus it's easy to infer that in cases where we only check that a URI argument, query or fragment isn't null it's semantically correct and more efficient to use the raw version.

            redestad Claes Redestad
            redestad Claes Redestad
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: