You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by pa...@apache.org on 2011/03/28 15:57:18 UTC
svn commit: r1086238 -
/directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/DetectedConnectionProperties.java
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 )
{