Author: jim.ma
Date: 2010-05-11 05:54:40 -0400 (Tue, 11 May 2010)
New Revision: 12202
Modified:
common/tags/jbossws-common-1.2.1.GA/src/main/java/org/jboss/wsf/common/ResourceLoaderAdapter.java
common/tags/jbossws-common-1.2.1.GA/src/main/java/org/jboss/wsf/common/URLLoaderAdapter.java
common/tags/jbossws-common-1.2.1.GA/src/main/java/org/jboss/wsf/common/injection/finders/ResourceFieldFinder.java
common/tags/jbossws-common-1.2.1.GA/src/main/java/org/jboss/wsf/common/injection/finders/ResourceMethodFinder.java
common/tags/jbossws-common-1.2.1.GA/src/test/java/org/jboss/test/ws/common/ResourceLoaderAdapterTestCase.java
common/tags/jbossws-common-1.2.1.GA/src/test/java/org/jboss/test/ws/common/URLLoaderAdapterTestCase.java
Log:
[JBPAPP-3813]:Fixed windows issues in common module
Modified:
common/tags/jbossws-common-1.2.1.GA/src/main/java/org/jboss/wsf/common/ResourceLoaderAdapter.java
===================================================================
---
common/tags/jbossws-common-1.2.1.GA/src/main/java/org/jboss/wsf/common/ResourceLoaderAdapter.java 2010-05-11
08:04:50 UTC (rev 12201)
+++
common/tags/jbossws-common-1.2.1.GA/src/main/java/org/jboss/wsf/common/ResourceLoaderAdapter.java 2010-05-11
09:54:40 UTC (rev 12202)
@@ -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/tags/jbossws-common-1.2.1.GA/src/main/java/org/jboss/wsf/common/URLLoaderAdapter.java
===================================================================
---
common/tags/jbossws-common-1.2.1.GA/src/main/java/org/jboss/wsf/common/URLLoaderAdapter.java 2010-05-11
08:04:50 UTC (rev 12201)
+++
common/tags/jbossws-common-1.2.1.GA/src/main/java/org/jboss/wsf/common/URLLoaderAdapter.java 2010-05-11
09:54:40 UTC (rev 12202)
@@ -147,14 +147,13 @@
String jarRoot = urlString.substring(4, urlString.indexOf("ar!") +
2);
String path = urlString.contains("!") ?
urlString.substring(urlString.lastIndexOf("!") + 2) : "";
if (path.endsWith(jarFileSeparator))
- path = path.substring(0, path.lastIndexOf(jarFileSeparator));
-
+ path = path.substring(0, path.lastIndexOf(jarFileSeparator));
try
- {
- String folder = jarRoot.substring(5,jarRoot.lastIndexOf(File.separator));
- String filename = jarRoot.substring(jarRoot.lastIndexOf(File.separator)+1);
+ {
+ System.out.println("jarRoot.lastIndexOf(File.separator) " +
jarRoot.lastIndexOf('/'));
+ 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>()
{
public JarFile run()
Modified:
common/tags/jbossws-common-1.2.1.GA/src/main/java/org/jboss/wsf/common/injection/finders/ResourceFieldFinder.java
===================================================================
---
common/tags/jbossws-common-1.2.1.GA/src/main/java/org/jboss/wsf/common/injection/finders/ResourceFieldFinder.java 2010-05-11
08:04:50 UTC (rev 12201)
+++
common/tags/jbossws-common-1.2.1.GA/src/main/java/org/jboss/wsf/common/injection/finders/ResourceFieldFinder.java 2010-05-11
09:54:40 UTC (rev 12202)
@@ -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/tags/jbossws-common-1.2.1.GA/src/main/java/org/jboss/wsf/common/injection/finders/ResourceMethodFinder.java
===================================================================
---
common/tags/jbossws-common-1.2.1.GA/src/main/java/org/jboss/wsf/common/injection/finders/ResourceMethodFinder.java 2010-05-11
08:04:50 UTC (rev 12201)
+++
common/tags/jbossws-common-1.2.1.GA/src/main/java/org/jboss/wsf/common/injection/finders/ResourceMethodFinder.java 2010-05-11
09:54:40 UTC (rev 12202)
@@ -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/tags/jbossws-common-1.2.1.GA/src/test/java/org/jboss/test/ws/common/ResourceLoaderAdapterTestCase.java
===================================================================
---
common/tags/jbossws-common-1.2.1.GA/src/test/java/org/jboss/test/ws/common/ResourceLoaderAdapterTestCase.java 2010-05-11
08:04:50 UTC (rev 12201)
+++
common/tags/jbossws-common-1.2.1.GA/src/test/java/org/jboss/test/ws/common/ResourceLoaderAdapterTestCase.java 2010-05-11
09:54:40 UTC (rev 12202)
@@ -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/tags/jbossws-common-1.2.1.GA/src/test/java/org/jboss/test/ws/common/URLLoaderAdapterTestCase.java
===================================================================
---
common/tags/jbossws-common-1.2.1.GA/src/test/java/org/jboss/test/ws/common/URLLoaderAdapterTestCase.java 2010-05-11
08:04:50 UTC (rev 12201)
+++
common/tags/jbossws-common-1.2.1.GA/src/test/java/org/jboss/test/ws/common/URLLoaderAdapterTestCase.java 2010-05-11
09:54:40 UTC (rev 12202)
@@ -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);