# HG changeset patch # User jjg # Date 1452320655 28800 # Node ID ed25a4c782c29870a1b60765d19a021159836530 # Parent e4e19f521ee72d85ae4c75ed4d03913e28d83a7e 8146727: test tools/sjavac/IncludeExcludePatterns.java fails on Windows Reviewed-by: darcy diff -r e4e19f521ee7 -r ed25a4c782c2 langtools/test/tools/sjavac/IncludeExcludePatterns.java --- a/langtools/test/tools/sjavac/IncludeExcludePatterns.java Fri Jan 08 17:02:29 2016 -0700 +++ b/langtools/test/tools/sjavac/IncludeExcludePatterns.java Fri Jan 08 22:24:15 2016 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -35,6 +35,7 @@ import com.sun.tools.javac.util.Assert; import com.sun.tools.sjavac.server.Sjavac; +import java.io.File; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; @@ -104,7 +105,7 @@ // Puts an empty (dummy) class definition in the given path. void writeDummyClass(Path javaFile) throws IOException { - String pkg = javaFile.getParent().toString().replace('/', '.'); + String pkg = javaFile.getParent().toString().replace(File.separatorChar, '.'); String cls = javaFile.getFileName().toString().replace(".java", ""); toolbox.writeFile(SRC.resolve(javaFile), "package " + pkg + "; class " + cls + " {}"); }