Author: jim.ma
Date: 2010-05-11 02:03:22 -0400 (Tue, 11 May 2010)
New Revision: 12200
Modified:
common/trunk/src/main/java/org/jboss/wsf/common/ResourceLoaderAdapter.java
common/trunk/src/main/java/org/jboss/wsf/common/URLLoaderAdapter.java
common/trunk/src/main/java/org/jboss/wsf/common/injection/finders/ResourceFieldFinder.java
common/trunk/src/main/java/org/jboss/wsf/common/injection/finders/ResourceMethodFinder.java
common/trunk/src/test/java/org/jboss/test/ws/common/ResourceLoaderAdapterTestCase.java
common/trunk/src/test/java/org/jboss/test/ws/common/URLLoaderAdapterTestCase.java
Log:
[JBWS-3023]:Fixed the windows issues in common module
Modified: common/trunk/src/main/java/org/jboss/wsf/common/ResourceLoaderAdapter.java
===================================================================
--- common/trunk/src/main/java/org/jboss/wsf/common/ResourceLoaderAdapter.java 2010-05-10
14:50:33 UTC (rev 12199)
+++ common/trunk/src/main/java/org/jboss/wsf/common/ResourceLoaderAdapter.java 2010-05-11
06:03:22 UTC (rev 12200)
@@ -140,8 +140,8 @@
try
{
//get the jar and open it
- String folder = jarRoot.substring(5,jarRoot.lastIndexOf(File.separator));
- String filename = jarRoot.substring(jarRoot.lastIndexOf(File.separator)+1);
+ String folder = jarRoot.substring(5,jarRoot.lastIndexOf("/"));
+ String filename = jarRoot.substring(jarRoot.lastIndexOf("/")+1);
final File jar = new File(folder, filename);
PrivilegedAction<JarFile> action = new
PrivilegedAction<JarFile>()
Modified: common/trunk/src/main/java/org/jboss/wsf/common/URLLoaderAdapter.java
===================================================================
--- common/trunk/src/main/java/org/jboss/wsf/common/URLLoaderAdapter.java 2010-05-10
14:50:33 UTC (rev 12199)
+++ common/trunk/src/main/java/org/jboss/wsf/common/URLLoaderAdapter.java 2010-05-11
06:03:22 UTC (rev 12200)
@@ -151,8 +151,8 @@
try
{
- String folder = jarRoot.substring(5,jarRoot.lastIndexOf(File.separator));
- String filename = jarRoot.substring(jarRoot.lastIndexOf(File.separator)+1);
+ String folder = jarRoot.substring(5,jarRoot.lastIndexOf("/"));
+ String filename = jarRoot.substring(jarRoot.lastIndexOf("/")+1);
final File jar = new File(folder, filename);
PrivilegedAction<JarFile> action = new
PrivilegedAction<JarFile>()
Modified:
common/trunk/src/main/java/org/jboss/wsf/common/injection/finders/ResourceFieldFinder.java
===================================================================
---
common/trunk/src/main/java/org/jboss/wsf/common/injection/finders/ResourceFieldFinder.java 2010-05-10
14:50:33 UTC (rev 12199)
+++
common/trunk/src/main/java/org/jboss/wsf/common/injection/finders/ResourceFieldFinder.java 2010-05-11
06:03:22 UTC (rev 12200)
@@ -37,7 +37,7 @@
* method declaration if necessary. The name of the resource, if not declared, is the
* name of the JavaBeans property as determined starting from the name of the setter
* method in question. The setter method must follow the standard JavaBeans
- * convention - name starts with a “set”, void return type and only one parameter.
+ * convention - name starts with a 'set', void return type and only one
parameter.
* Additionally, the type of the parameter must be compatible with the type specified
* as a property of the Resource if present.
*
Modified:
common/trunk/src/main/java/org/jboss/wsf/common/injection/finders/ResourceMethodFinder.java
===================================================================
---
common/trunk/src/main/java/org/jboss/wsf/common/injection/finders/ResourceMethodFinder.java 2010-05-10
14:50:33 UTC (rev 12199)
+++
common/trunk/src/main/java/org/jboss/wsf/common/injection/finders/ResourceMethodFinder.java 2010-05-11
06:03:22 UTC (rev 12200)
@@ -36,7 +36,7 @@
* method declaration if necessary. The name of the resource, if not declared, is the
* name of the JavaBeans property as determined starting from the name of the setter
* method in question. The setter method must follow the standard JavaBeans
- * convention - name starts with a “set”, void return type and only one parameter.
+ * convention - name starts with a 'set', void return type and only one
parameter.
* Additionally, the type of the parameter must be compatible with the type specified
* as a property of the Resource if present.
*
Modified:
common/trunk/src/test/java/org/jboss/test/ws/common/ResourceLoaderAdapterTestCase.java
===================================================================
---
common/trunk/src/test/java/org/jboss/test/ws/common/ResourceLoaderAdapterTestCase.java 2010-05-10
14:50:33 UTC (rev 12199)
+++
common/trunk/src/test/java/org/jboss/test/ws/common/ResourceLoaderAdapterTestCase.java 2010-05-11
06:03:22 UTC (rev 12200)
@@ -72,7 +72,7 @@
UnifiedVirtualFile common = ula.findChild("org/jboss/wsf/common/");
assertNotNull(common);
- assertTrue(common.toURL().toExternalForm().contains("target" +
File.separator + "classes")); //check we got a URL to dir
+ assertTrue(common.toURL().toExternalForm().contains("target/classes"));
//check we got a URL to dir
assertEquals("common/", common.getName());
List<UnifiedVirtualFile> children = common.getChildren();
assertNotNull(children);
Modified:
common/trunk/src/test/java/org/jboss/test/ws/common/URLLoaderAdapterTestCase.java
===================================================================
---
common/trunk/src/test/java/org/jboss/test/ws/common/URLLoaderAdapterTestCase.java 2010-05-10
14:50:33 UTC (rev 12199)
+++
common/trunk/src/test/java/org/jboss/test/ws/common/URLLoaderAdapterTestCase.java 2010-05-11
06:03:22 UTC (rev 12200)
@@ -76,7 +76,7 @@
UnifiedVirtualFile common = ula.findChild("org/jboss/wsf/common/");
assertNotNull(common);
- assertTrue(common.toURL().toExternalForm().contains("target" +
File.separator + "classes")); //check we got a URL to dir
+ assertTrue(common.toURL().toExternalForm().contains("target/classes"));
//check we got a URL to dir
assertEquals("common/", common.getName());
List<UnifiedVirtualFile> children = common.getChildren();
assertNotNull(children);