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

Addendum: Bug#7181278

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P4
    • None
    • 7
    • core-libs
    • x86
    • windows_7

    Description

      FULL PRODUCT VERSION :


      A DESCRIPTION OF THE PROBLEM :
      I can find no way to post to or edit bug#7181278 that I recently posted, so I'm trying a new report that references that one. Please update bug#7181278, delete this addendum, and let me know of a more proper way to update a bug report.

      I accidentally copied and pasted a truncated version of the revised uniToPath(uri) method to the original bug report. It was missing the check for the "jar" scheme. Please replace it with the following correct full version.


      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      static Path uriToPath(URI uri) {
          String scheme = uri.getScheme();
          if (scheme == null || !scheme.equalsIgnoreCase(getScheme())) {
              throw new IllegalArgumentException("URI scheme is not '" + getScheme() + "'");
          }
          try {
              // only support legacy JAR URL syntax jar:{uri}!/{entry} for now
              String spec = uri.getRawSchemeSpecificPart();
              int sep = spec.indexOf("!/");
              if (sep != -1) spec = spec.substring(0, sep);
              return Paths.get(new URI(spec)).toAbsolutePath();
          } catch (URISyntaxException exception) {
              throw new IllegalArgumentException(exception.getMessage(), exception);
          }
      }

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: