changeset 27:f5c6d0f7fcd3

harness: fix the test discovery on Windows. It is not safe to assume JAR entries will have the platform-specific separator. It is more straightforward to convert all known separators at once.
author shade
date Fri, 12 Jul 2013 12:55:15 +0400
parents 6c339a5aa00d
children 6d9c5bd295d1
files harness/src/main/java/org/openjdk/jcstress/util/Reflections.java
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/harness/src/main/java/org/openjdk/jcstress/util/Reflections.java	Thu Jul 11 14:48:15 2013 +0400
+++ b/harness/src/main/java/org/openjdk/jcstress/util/Reflections.java	Fri Jul 12 12:55:15 2013 +0400
@@ -101,7 +101,8 @@
 
         final List<Class> newClasses = new ArrayList<Class>();
         for (String name : RESOURCES) {
-            name = name.replaceAll("\\" + File.separator, ".");
+            name = name.replaceAll("\\\\", ".");
+            name = name.replaceAll("/", ".");
             if (name.contains(filter) && name.endsWith(".class")) {
                 try {
                     newClasses.add(Class.forName(name.substring(name.indexOf(filter), name.length() - 6)));