diff options
author | Jay Arthanareeswaran | 2019-03-06 06:33:46 +0000 |
---|---|---|
committer | Jay Arthanareeswaran | 2019-03-06 09:43:37 +0000 |
commit | e610552c6fa74d3273565496cd9138987ee68fc6 (patch) | |
tree | 71c232be0b29b56d0b65b29e3953082542d8fef4 /org.eclipse.jdt.core/model/org/eclipse | |
parent | 8b28c9c5e54c8a5ba7074f2ffd5d972e9f2a963e (diff) | |
download | eclipse.jdt.core-e610552c6fa74d3273565496cd9138987ee68fc6.tar.gz eclipse.jdt.core-e610552c6fa74d3273565496cd9138987ee68fc6.tar.xz eclipse.jdt.core-e610552c6fa74d3273565496cd9138987ee68fc6.zip |
Change-Id: I81a2a21f4c342ecee730b8016fabaab9d2bd8587
Signed-off-by: Jay Arthanareeswaran <jarthana@in.ibm.com>
Diffstat (limited to 'org.eclipse.jdt.core/model/org/eclipse')
5 files changed, 11 insertions, 13 deletions
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaProject.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaProject.java index 301df83247..fdb13ad30c 100644 --- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaProject.java +++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaProject.java @@ -935,8 +935,8 @@ public class JavaProject } @Override - public FileVisitResult visitModule(java.nio.file.Path mod) throws IOException { - JrtPackageFragmentRoot root = new JrtPackageFragmentRoot(imagePath, mod.toString(), JavaProject.this); + public FileVisitResult visitModule(java.nio.file.Path path, String name) throws IOException { + JrtPackageFragmentRoot root = new JrtPackageFragmentRoot(imagePath, name, JavaProject.this); roots.add(root); if (rootToResolvedEntries != null) rootToResolvedEntries.put(root, ((ClasspathEntry)resolvedEntry).combineWith((ClasspathEntry) referringEntry)); diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JrtPackageFragmentRoot.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JrtPackageFragmentRoot.java index cd3e8158c8..dba3e1a374 100644 --- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JrtPackageFragmentRoot.java +++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JrtPackageFragmentRoot.java @@ -78,8 +78,8 @@ public class JrtPackageFragmentRoot extends JarPackageFragmentRoot implements IM } @Override - public FileVisitResult visitModule(Path mod) throws IOException { - if (!JrtPackageFragmentRoot.this.moduleName.equals(mod.toString())) { + public FileVisitResult visitModule(Path path, String name) throws IOException { + if (!JrtPackageFragmentRoot.this.moduleName.equals(name)) { return FileVisitResult.SKIP_SUBTREE; } return FileVisitResult.CONTINUE; diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SourceMapper.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SourceMapper.java index 64cf749f1f..4c99d4add2 100644 --- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SourceMapper.java +++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SourceMapper.java @@ -530,7 +530,7 @@ public class SourceMapper } @Override - public FileVisitResult visitModule(java.nio.file.Path mod) throws IOException { + public FileVisitResult visitModule(java.nio.file.Path path, String name) throws IOException { return FileVisitResult.CONTINUE; } } diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathJrt.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathJrt.java index c9a57cda0b..9576ce72fe 100644 --- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathJrt.java +++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathJrt.java @@ -101,8 +101,7 @@ static HashMap<String, SimpleSet> findPackagesInModules(final ClasspathJrt jrt) } @Override - public FileVisitResult visitModule(Path mod) throws IOException { - String name = mod.toString(); + public FileVisitResult visitModule(Path path, String name) throws IOException { try { jrt.acceptModule(JRTUtil.getClassfileContent(imageFile, IModule.MODULE_INFO_CLASS, name)); } catch (ClassFormatException e) { @@ -144,9 +143,9 @@ public static void loadModules(final ClasspathJrt jrt) { } @Override - public FileVisitResult visitModule(Path mod) throws IOException { + public FileVisitResult visitModule(Path path, String name) throws IOException { try { - jrt.acceptModule(JRTUtil.getClassfileContent(imageFile, IModule.MODULE_INFO_CLASS, mod.toString())); + jrt.acceptModule(JRTUtil.getClassfileContent(imageFile, IModule.MODULE_INFO_CLASS, name)); } catch (ClassFormatException e) { e.printStackTrace(); } diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathJrtWithReleaseOption.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathJrtWithReleaseOption.java index fdef682456..9a388393ce 100644 --- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathJrtWithReleaseOption.java +++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/ClasspathJrtWithReleaseOption.java @@ -96,7 +96,7 @@ public class ClasspathJrtWithReleaseOption extends ClasspathJrt { private boolean isJRE12Plus(Path path) { try (DirectoryStream<java.nio.file.Path> stream = Files.newDirectoryStream(path)) { for (final java.nio.file.Path subdir : stream) { - String rel = subdir.getFileName().toString(); + String rel = JRTUtil.sanitizedFileName(subdir); if (Files.exists(this.fs.getPath(rel, "system-modules"))) { //$NON-NLS-1$ int parseInt = Integer.parseInt(rel, 16); return (parseInt > 11); @@ -158,7 +158,7 @@ public class ClasspathJrtWithReleaseOption extends ClasspathJrt { List<String> sub = new ArrayList<>(); try (DirectoryStream<java.nio.file.Path> stream = Files.newDirectoryStream(releasePath)) { for (final java.nio.file.Path subdir : stream) { - String rel = subdir.getFileName().toString(); + String rel = JRTUtil.sanitizedFileName(subdir); if (rel.contains(this.releaseInHex)) { sub.add(rel); } else { @@ -205,8 +205,7 @@ public class ClasspathJrtWithReleaseOption extends ClasspathJrt { } @Override - public FileVisitResult visitModule(Path mod) throws IOException { - String name = mod.getName(1).toString(); + public FileVisitResult visitModule(Path path, String name) throws IOException { this.packageSet = new SimpleSet(41); this.packageSet.add(""); //$NON-NLS-1$ packagesInModule.put(name, this.packageSet); |