Uploaded image for project: 'Harmony'
  1. Harmony
  2. HARMONY-6499

[classlib][luni] URLStreamHandler.parseURL throws different exception to RI in some cases

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 5.0M15
    • Classlib
    • None
    • Patch Available
    • Novice

    Description

      java.net.URLStreamHandler throws a SecurityException in some situations where the RI will throw a StringIndexOutOfBoundsException. From experimenting with test cases I think the RI is checking bounds as it parses the URL and not up front, which causes some inconsistent behaviour. There's already one work-around added to this method in order to make it more compatible (HARMONY-2941)

      The following all throw SecurityExceptions on Harmony (when called with a handler that is not the URL's protocol handler) where they throw StringIndexOutOfBoundsExceptions on the RI:
      handler.parse(url, "any", 10, Integer.MIN_VALUE);
      handler.parse(url, "any", 10, Integer.MIN_VALUE+1);
      handler.parse(url, "any", Integer.MIN_VALUE, Integer.MIN_VALUE);
      handler.parse(url, "any", Integer.MIN_VALUE, 2);

      Attachments

        1. ASF.LICENSE.NOT.GRANTED--6499.patch
          3 kB
          Catherine Hope
        2. 6499-2.patch
          4 kB
          Catherine Hope

        Activity

          People

            tellison Tim Ellison
            chope Catherine Hope
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: