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

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 9
    • Affects Version/s: None
    • Component/s: core-libs
    • b104
    • generic
    • generic
    • Verified

      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.

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

              Created:
              Updated:
              Resolved: