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

getResources() returns incorrect locations with module path and --patch-module

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: 10.0.1
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:

      Description

      ADDITIONAL SYSTEM INFORMATION :
      macOS
      java 10.0.1 2018-04-17
      Java(TM) SE Runtime Environment 18.3 (build 10.0.1+10)
      Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.1+10, mixed mode)

      A DESCRIPTION OF THE PROBLEM :
      When using the module path and --patch-module ClassLoader.getResources() does not return the expected locations. When the requested location is available in both the module and the patch, the location in the patch is returned twice (one with a trailing / and once without), rather than the location in the module and the location in the patch being returned.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Configure JAVA_HOME to point to Java 10
      $ git clone https://github.com/wilkinsona/module-path-scanning
      $ cd module-path-scanning
      $ ./mvnw test


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The test passes
      ACTUAL -
      The test fails

      ---------- BEGIN SOURCE ----------
      https://github.com/wilkinsona/module-path-scanning
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Delete src/main/java/module-info.java so that the module path is not used

      FREQUENCY : always


        Attachments

          Activity

            People

            • Assignee:
              alanb Alan Bateman
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: