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

URI.toURL could be more efficient for most non-opaque URIs

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b104
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Description

      For non-opaque URIs, the URI components will have been parsed and validated in accordance with the RFC2396 rules, but URI.toURL() goes the route via new URL(String spec) which validates the URI again.

      By going via one of URLs component based constructor, URI.toURL could be faster as well as allocate less garbage.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: