directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1086238 - /directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/DetectedConnectionProperties.java
Date Mon, 28 Mar 2011 13:57:18 GMT
Author: pamarcelot
Date: Mon Mar 28 13:57:18 2011
New Revision: 1086238

URL: http://svn.apache.org/viewvc?rev=1086238&view=rev
Log:
Preventing an NPE.

Modified:
    directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/DetectedConnectionProperties.java

Modified: directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/DetectedConnectionProperties.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/DetectedConnectionProperties.java?rev=1086238&r1=1086237&r2=1086238&view=diff
==============================================================================
--- directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/DetectedConnectionProperties.java
(original)
+++ directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/DetectedConnectionProperties.java
Mon Mar 28 13:57:18 2011
@@ -80,8 +80,16 @@ public class DetectedConnectionPropertie
     {
         try
         {
-            return ConnectionServerType.valueOf( connection.getConnectionParameter().getExtendedProperty(
-                CONNECTION_PARAMETER_SERVER_TYPE ) );
+            String serverType = connection.getConnectionParameter().getExtendedProperty(
CONNECTION_PARAMETER_SERVER_TYPE );
+            
+            if ( serverType != null )
+            {
+                return ConnectionServerType.valueOf( serverType );
+            }
+            else
+            {
+                return ConnectionServerType.UNKNOWN;
+            }
         }
         catch ( IllegalArgumentException e )
         {



Mime
View raw message