Mercurial > hg > jdk9-shenandoah > langtools
changeset 2703:d32c4f52e295
8063074: test/tools/javac/plugin/showType/Test.java fails on Windows
Reviewed-by: ksrini
author | jjg |
---|---|
date | Wed, 05 Nov 2014 19:48:42 -0800 |
parents | b9daa6475f12 |
children | 7b6a6aeeb544 |
files | test/tools/javac/plugin/showtype/Test.java test/tools/lib/ToolBox.java |
diffstat | 2 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/test/tools/javac/plugin/showtype/Test.java Wed Nov 05 19:12:45 2014 -0800 +++ b/test/tools/javac/plugin/showtype/Test.java Wed Nov 05 19:48:42 2014 -0800 @@ -85,9 +85,9 @@ .run(); File plugin = new File(pluginClasses.getPath(), "META-INF/services/com.sun.source.util.Plugin"); - tb.writeFile(plugin.getPath(),"ShowTypePlugin"); + tb.writeFile(plugin.getPath(), "ShowTypePlugin\n"); tb.new JarTask() - .run("cf", pluginJar.getPath(),"-C", pluginClasses.getPath(), "."); + .run("cf", pluginJar.getPath(), "-C", pluginClasses.getPath(), "."); testCommandLine("-Xplugin:showtype", ref1); testCommandLine("-Xplugin:showtype PI", ref2);
--- a/test/tools/lib/ToolBox.java Wed Nov 05 19:12:45 2014 -0800 +++ b/test/tools/lib/ToolBox.java Wed Nov 05 19:48:42 2014 -0800 @@ -1475,7 +1475,11 @@ @Override public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) { try { - JarEntry e = new JarEntry(base.relativize(file).normalize().toString()); + String p = base.relativize(file) + .normalize() + .toString() + .replace(File.separatorChar, '/'); + JarEntry e = new JarEntry(p); jos.putNextEntry(e); jos.write(Files.readAllBytes(file)); jos.closeEntry();