You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by ff...@apache.org on 2012/12/13 09:45:38 UTC

svn commit: r1421139 - in /cxf/branches/2.6.x-fixes: ./ maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java

Author: ffang
Date: Thu Dec 13 08:45:38 2012
New Revision: 1421139

URL: http://svn.apache.org/viewvc?rev=1421139&view=rev
Log:
Merged revisions 1421120 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1421120 | ffang | 2012-12-13 16:15:36 +0800 (四, 13 12 2012) | 1 line
  
  [CXF-4687]add NPE guard
........

Modified:
    cxf/branches/2.6.x-fixes/   (props changed)
    cxf/branches/2.6.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java

Propchange: cxf/branches/2.6.x-fixes/
------------------------------------------------------------------------------
  Merged /cxf/trunk:r1421120

Propchange: cxf/branches/2.6.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.6.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java?rev=1421139&r1=1421138&r2=1421139&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java (original)
+++ cxf/branches/2.6.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java Thu Dec 13 08:45:38 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,