cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r1483151 - in /cxf/trunk/maven-plugins: codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/ corba/src/main/java/org/apache/cxf/maven_plugin/corba/maven/plugins/ java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/ wadl2java-plugi...
Date Thu, 16 May 2013 02:03:10 GMT
Author: ffang
Date: Thu May 16 02:03:10 2013
New Revision: 1483151

URL: http://svn.apache.org/r1483151
Log:
[CXF-5020]add NPE guard when we restore original java.class.path system property

Modified:
    cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/ClassLoaderSwitcher.java
    cxf/trunk/maven-plugins/corba/src/main/java/org/apache/cxf/maven_plugin/corba/maven/plugins/WSDLToIDLPlugin.java
    cxf/trunk/maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/ClassLoaderSwitcher.java
    cxf/trunk/maven-plugins/wadl2java-plugin/src/main/java/org/apache/cxf/maven_plugin/common/ClassLoaderSwitcher.java

Modified: cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/ClassLoaderSwitcher.java
URL: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/ClassLoaderSwitcher.java?rev=1483151&r1=1483150&r2=1483151&view=diff
==============================================================================
--- cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/ClassLoaderSwitcher.java
(original)
+++ cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/ClassLoaderSwitcher.java
Thu May 16 02:03:10 2013
@@ -118,7 +118,9 @@ public class ClassLoaderSwitcher {
      */
     public void restoreClassLoader() {
         Thread.currentThread().setContextClassLoader(origContextClassloader);
-        System.setProperty("java.class.path", origClassPath);
+        if (origClassPath != null) {
+            System.setProperty("java.class.path", origClassPath);
+        }
 
         Map<Object, Object> newProps = new HashMap<Object, Object>(System.getProperties());
         for (Object o : newProps.keySet()) {

Modified: cxf/trunk/maven-plugins/corba/src/main/java/org/apache/cxf/maven_plugin/corba/maven/plugins/WSDLToIDLPlugin.java
URL: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/corba/src/main/java/org/apache/cxf/maven_plugin/corba/maven/plugins/WSDLToIDLPlugin.java?rev=1483151&r1=1483150&r2=1483151&view=diff
==============================================================================
--- cxf/trunk/maven-plugins/corba/src/main/java/org/apache/cxf/maven_plugin/corba/maven/plugins/WSDLToIDLPlugin.java
(original)
+++ cxf/trunk/maven-plugins/corba/src/main/java/org/apache/cxf/maven_plugin/corba/maven/plugins/WSDLToIDLPlugin.java
Thu May 16 02:03:10 2013
@@ -169,7 +169,9 @@ public class WSDLToIDLPlugin extends Abs
                 bus.shutdown(true);
             }
             Thread.currentThread().setContextClassLoader(origContext);
-            System.setProperty("java.class.path", cp);
+            if (cp != null) {
+                System.setProperty("java.class.path", cp);
+            }
             
             Map<Object, Object> newProps = new HashMap<Object, Object>(System.getProperties());
             for (Object o : newProps.keySet()) {

Modified: cxf/trunk/maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/ClassLoaderSwitcher.java
URL: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/ClassLoaderSwitcher.java?rev=1483151&r1=1483150&r2=1483151&view=diff
==============================================================================
--- cxf/trunk/maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/ClassLoaderSwitcher.java
(original)
+++ cxf/trunk/maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/ClassLoaderSwitcher.java
Thu May 16 02:03:10 2013
@@ -111,7 +111,9 @@ public class ClassLoaderSwitcher {
      */
     public void restoreClassLoader() {
         Thread.currentThread().setContextClassLoader(origContextClassloader);
-        System.setProperty("java.class.path", origClassPath);
+        if (origClassPath != null) {
+            System.setProperty("java.class.path", origClassPath);
+        }
 
         Map<Object, Object> newProps = new HashMap<Object, Object>(System.getProperties());
         for (Object o : newProps.keySet()) {

Modified: cxf/trunk/maven-plugins/wadl2java-plugin/src/main/java/org/apache/cxf/maven_plugin/common/ClassLoaderSwitcher.java
URL: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/wadl2java-plugin/src/main/java/org/apache/cxf/maven_plugin/common/ClassLoaderSwitcher.java?rev=1483151&r1=1483150&r2=1483151&view=diff
==============================================================================
--- cxf/trunk/maven-plugins/wadl2java-plugin/src/main/java/org/apache/cxf/maven_plugin/common/ClassLoaderSwitcher.java
(original)
+++ cxf/trunk/maven-plugins/wadl2java-plugin/src/main/java/org/apache/cxf/maven_plugin/common/ClassLoaderSwitcher.java
Thu May 16 02:03:10 2013
@@ -120,7 +120,9 @@ public class ClassLoaderSwitcher {
      */
     public void restoreClassLoader() {
         Thread.currentThread().setContextClassLoader(origContextClassloader);
-        System.setProperty("java.class.path", origClassPath);
+        if (origClassPath != null) {
+            System.setProperty("java.class.path", origClassPath);
+        }
 
         Map<Object, Object> newProps = new HashMap<Object, Object>(System.getProperties());
         for (Object o : newProps.keySet()) {



Mime
View raw message