Author: thomas.diesler(a)jboss.com
Date: 2008-05-22 10:43:57 -0400 (Thu, 22 May 2008)
New Revision: 7137
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java
Log:
Rostore previous classpath handling
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java 2008-05-22
14:35:24 UTC (rev 7136)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java 2008-05-22
14:43:57 UTC (rev 7137)
@@ -210,14 +210,14 @@
// See WsimportTool#compileGeneratedClasses()
String orgJavaClassPath = System.getProperty("java.class.path");
- String javaClassPath = (orgJavaClassPath != null ? orgJavaClassPath :
"");
if(additionalCompilerClassPath.isEmpty() == false)
{
- for(String pathElement : additionalCompilerClassPath)
+ StringBuffer javaCP = new StringBuffer();
+ for(String s : additionalCompilerClassPath)
{
- javaClassPath += pathElement + File.pathSeparator;
+ javaCP.append(s).append(File.pathSeparator);
}
- System.setProperty("java.class.path", javaClassPath);
+ System.setProperty("java.class.path", javaCP.toString());
}
try
@@ -239,20 +239,11 @@
{
rte.printStackTrace();
}
-
throw rte;
}
finally
{
- // restore the original value of the java.class.path property
- if (orgJavaClassPath != null)
- {
- System.setProperty("java.class.path", orgJavaClassPath);
- }
- else
- {
- System.clearProperty("java.class.path");
- }
+ System.setProperty("java.class.path", orgJavaClassPath);
}
}
}
Show replies by date