cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r1421120 - /cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java
Date Thu, 13 Dec 2012 08:15:37 GMT
Author: ffang
Date: Thu Dec 13 08:15:36 2012
New Revision: 1421120

URL: http://svn.apache.org/viewvc?rev=1421120&view=rev
Log:
[CXF-4687]add NPE guard

Modified:
    cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java

Modified: cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java
URL: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java?rev=1421120&r1=1421119&r2=1421120&view=diff
==============================================================================
--- cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java
(original)
+++ cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java
Thu Dec 13 08:15:36 2012
@@ -321,9 +321,15 @@ public abstract class AbstractCodegenMoh
 
     private void restoreProxySetting(String originalProxyHost, String originalProxyPort,
                                      String originalNonProxyHosts) {
-        System.setProperty(HTTP_PROXY_HOST, originalProxyHost);
-        System.setProperty(HTTP_PROXY_PORT, originalProxyPort);
-        System.setProperty(HTTP_NON_PROXY_HOSTS, originalNonProxyHosts);        
+        if (originalProxyHost != null) {
+            System.setProperty(HTTP_PROXY_HOST, originalProxyHost);
+        }
+        if (originalProxyPort != null) {
+            System.setProperty(HTTP_PROXY_PORT, originalProxyPort);
+        }
+        if (originalNonProxyHosts != null) {
+            System.setProperty(HTTP_NON_PROXY_HOSTS, originalNonProxyHosts);
+        }
     }
 
     protected abstract Bus generate(GenericWsdlOption o, 



Mime
View raw message