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

sun/reflect/CallerSensitive/CallerSensitiveFinder.java should use the JRT FileSystem

XMLWordPrintable

        The modular image no longer contains jar files. The test should use the JRT FileSystem to iterate over the image class files.

        Test sun/reflect/CallerSensitive/CallerSensitiveFinder.java need to be re-examined, it tries to check JAR files under jre/lib. The test is passes, but does not actually do anything useful.

                if (classes.isEmpty()) {
                    classes.addAll(PlatformClassPath.getJREClasses());
                }
        ...
            static class PlatformClassPath {
                static List<Path> getJREClasses() throws IOException {
                    List<Path> result = new ArrayList<Path>();
                    Path home = Paths.get(System.getProperty("java.home"));

                    if (home.endsWith("jre")) {
                        // jar files in <javahome>/jre/lib
                        // skip <javahome>/lib
                        result.addAll(addJarFiles(home.resolve("lib")));
        ...

              chegar Chris Hegarty
              amlu Amy Lu (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: