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

Remove dependence on JAR filename in CDS tests

    XMLWordPrintable

Details

    • b22
    • generic

    Backports

      Description

        Tests generated by CDSMHTest_generate.sh scripts include a hard-coded assumption on from where JUnit classes are loaded from. Namely: junit.jar This filename will change in JTREg 7 as described in https://bugs.openjdk.java.net/browse/CODETOOLS-7903047 and attached PRs.
        In addition, the code seems to fail on splitting the class path correctly on Windows systems using Cygwin.

        Possible fix for both issues: Use the location information stored in JUnit Test class' runtime representation.

        String junitJar = Path.of(Test.class.getProtectionDomain().getCodeSource().getLocation().toURI()).toString();


        Attachments

          Issue Links

            Activity

              People

                cstein Christian Stein
                cstein Christian Stein
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: