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

Some syntax checks performed by URL.openConnection() could be performed earlier, at URL construction

    XMLWordPrintable

Details

    • b20

    Description

      Many built-in URL Handlers perform additional syntax checking on the URL when URLStreamHandler::openConnection / connect is called. In some cases, some of these checks could be also performed earlier, when URLStreamHandler::parseURL is called.

      Because URLStreamHandler::parseURL is called during URL construction, throwing a MalformedURLException in parseURL would avoid letting the caller construct an URL that will later fail when invoking URL::openConnection.

      Attachments

        Issue Links

          Activity

            People

              dfuchs Daniel Fuchs
              dfuchs Daniel Fuchs
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: