Title: [964] branches/jbehave-2.0.x/jbehave-core/src/java/org/jbehave/scenario/parser/ScenarioClassNameFinder.java: JBEHAVE-135: Ensured backslash are also replaced when finding class names on Windows.
Revision
964
Author
mauro
Date
2008-10-06 06:04:04 -0500 (Mon, 06 Oct 2008)

Log Message

JBEHAVE-135:  Ensured backslash are also replaced when finding class names on Windows.

Modified Paths

Diff

Modified: branches/jbehave-2.0.x/jbehave-core/src/java/org/jbehave/scenario/parser/ScenarioClassNameFinder.java (963 => 964)

--- branches/jbehave-2.0.x/jbehave-core/src/java/org/jbehave/scenario/parser/ScenarioClassNameFinder.java	2008-10-06 10:01:31 UTC (rev 963)
+++ branches/jbehave-2.0.x/jbehave-core/src/java/org/jbehave/scenario/parser/ScenarioClassNameFinder.java	2008-10-06 11:04:04 UTC (rev 964)
@@ -18,6 +18,7 @@
     private static final String EMPTY = "";
     private static final String DOT_REGEX = "\\.";
     private static final String SLASH = "/";
+	private static final String BACKSLASH = "\\\\";
 
     private DirectoryScanner scanner = new DirectoryScanner();
 
@@ -46,7 +47,8 @@
         int javaPath = path.indexOf(JAVA);
         if ( javaPath != -1 ){
             String className = path.substring(0, javaPath);
-            return className.replaceAll(SLASH, DOT_REGEX);            
+            className = className.replaceAll(SLASH, DOT_REGEX); 
+            return className.replaceAll(BACKSLASH, DOT_REGEX);            
         }
         throw new InvalidScenarioClassPathException("Invalid scenario class path "+path);
     }


To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Reply via email to