cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1514018 - /cxf/trunk/rt/features/clustering/src/main/java/org/apache/cxf/clustering/FailoverTargetSelector.java
Date Wed, 14 Aug 2013 19:49:21 GMT
Author: sergeyb
Date: Wed Aug 14 19:49:20 2013
New Revision: 1514018

URL: http://svn.apache.org/r1514018
Log:
[CXF-5185] NPE guard in FailoverTargetSelector

Modified:
    cxf/trunk/rt/features/clustering/src/main/java/org/apache/cxf/clustering/FailoverTargetSelector.java

Modified: cxf/trunk/rt/features/clustering/src/main/java/org/apache/cxf/clustering/FailoverTargetSelector.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/features/clustering/src/main/java/org/apache/cxf/clustering/FailoverTargetSelector.java?rev=1514018&r1=1514017&r2=1514018&view=diff
==============================================================================
--- cxf/trunk/rt/features/clustering/src/main/java/org/apache/cxf/clustering/FailoverTargetSelector.java
(original)
+++ cxf/trunk/rt/features/clustering/src/main/java/org/apache/cxf/clustering/FailoverTargetSelector.java
Wed Aug 14 19:49:20 2013
@@ -392,16 +392,18 @@ public class FailoverTargetSelector exte
         }
 
         Endpoint retrieveOriginalEndpoint(Endpoint endpoint) {
-            if (endpoint != originalEndpoint) {
-                getLogger().log(Level.INFO,
-                                "REVERT_TO_ORIGINAL_TARGET",
-                                endpoint.getEndpointInfo().getName());
-            }
-            if (!endpoint.getEndpointInfo().getAddress().equals(originalAddress)) {
-                endpoint.getEndpointInfo().setAddress(originalAddress);
-                getLogger().log(Level.INFO,
-                                "REVERT_TO_ORIGINAL_ADDRESS",
-                                endpoint.getEndpointInfo().getAddress());
+            if (endpoint != null) {
+                if (endpoint != originalEndpoint) {
+                    getLogger().log(Level.INFO,
+                                    "REVERT_TO_ORIGINAL_TARGET",
+                                    endpoint.getEndpointInfo().getName());
+                }
+                if (!endpoint.getEndpointInfo().getAddress().equals(originalAddress)) {
+                    endpoint.getEndpointInfo().setAddress(originalAddress);
+                    getLogger().log(Level.INFO,
+                                    "REVERT_TO_ORIGINAL_ADDRESS",
+                                    endpoint.getEndpointInfo().getAddress());
+                }
             }
             return originalEndpoint;
         }



Mime
View raw message