activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r390411 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnector.java
Date Fri, 31 Mar 2006 12:50:20 GMT
Author: rajdavies
Date: Fri Mar 31 04:50:18 2006
New Revision: 390411

URL: http://svn.apache.org/viewcvs?rev=390411&view=rev
Log:
fix for NPE

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnector.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnector.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnector.java?rev=390411&r1=390410&r2=390411&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnector.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnector.java
Fri Mar 31 04:50:18 2006
@@ -285,9 +285,17 @@
         connections.remove(connection);
     }
 
-    public String getName() {
-        if( name == null ) {
-            name = server.getConnectURI().toString();
+    public String getName(){
+        if(name==null){
+            if(server!=null){
+                if(server.getConnectURI()!=null){
+                    name=server.getConnectURI().toString();
+                }else{
+                    name = server.getClass() + ":Not started";
+                }
+            }else{
+                name = "NOT_SET";
+            }
         }
         return name;
     }



Mime
View raw message