directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r1178343 - in /directory/shared/trunk: dsml/engine/src/main/java/org/apache/directory/shared/dsmlv2/engine/ i18n/src/main/java/org/apache/directory/shared/i18n/ i18n/src/main/resources/org/apache/directory/shared/i18n/
Date Mon, 03 Oct 2011 08:56:32 GMT
Author: felixk
Date: Mon Oct  3 08:56:32 2011
New Revision: 1178343

URL: http://svn.apache.org/viewvc?rev=1178343&view=rev
Log:
Fix possible NPE

Modified:
    directory/shared/trunk/dsml/engine/src/main/java/org/apache/directory/shared/dsmlv2/engine/Dsmlv2Engine.java
    directory/shared/trunk/i18n/src/main/java/org/apache/directory/shared/i18n/I18n.java
    directory/shared/trunk/i18n/src/main/resources/org/apache/directory/shared/i18n/errors.properties

Modified: directory/shared/trunk/dsml/engine/src/main/java/org/apache/directory/shared/dsmlv2/engine/Dsmlv2Engine.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml/engine/src/main/java/org/apache/directory/shared/dsmlv2/engine/Dsmlv2Engine.java?rev=1178343&r1=1178342&r2=1178343&view=diff
==============================================================================
--- directory/shared/trunk/dsml/engine/src/main/java/org/apache/directory/shared/dsmlv2/engine/Dsmlv2Engine.java
(original)
+++ directory/shared/trunk/dsml/engine/src/main/java/org/apache/directory/shared/dsmlv2/engine/Dsmlv2Engine.java
Mon Oct  3 08:56:32 2011
@@ -765,6 +765,11 @@ public class Dsmlv2Engine
             return;
         }
         
+        if ( connection == null )
+        {
+        	throw new IOException( I18n.err( I18n.ERR_03101_MISSING_CONNECTION_TO ) );
+        }
+        
         BindRequest bindRequest = new BindRequestImpl();
         bindRequest.setSimple( true );
         bindRequest.setCredentials( Strings.getBytesUtf8(password) );

Modified: directory/shared/trunk/i18n/src/main/java/org/apache/directory/shared/i18n/I18n.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/i18n/src/main/java/org/apache/directory/shared/i18n/I18n.java?rev=1178343&r1=1178342&r2=1178343&view=diff
==============================================================================
--- directory/shared/trunk/i18n/src/main/java/org/apache/directory/shared/i18n/I18n.java (original)
+++ directory/shared/trunk/i18n/src/main/java/org/apache/directory/shared/i18n/I18n.java Mon
Oct  3 08:56:32 2011
@@ -134,6 +134,9 @@ public enum I18n
     ERR_03039( "ERR_03039" ),
     ERR_03040( "ERR_03040" ),
 
+    // dsml-engine
+    ERR_03101_MISSING_CONNECTION_TO( "ERR_03101_MISSING_CONNECTION_TO" ),
+
     // ldap
     ERR_04001_NULL_IDENTIFICATION_TAG( "ERR_04001_NULL_IDENTIFICATION_TAG" ),
     ERR_04002_BAD_PRECENDENCE( "ERR_04002_BAD_PRECENDENCE" ),

Modified: directory/shared/trunk/i18n/src/main/resources/org/apache/directory/shared/i18n/errors.properties
URL: http://svn.apache.org/viewvc/directory/shared/trunk/i18n/src/main/resources/org/apache/directory/shared/i18n/errors.properties?rev=1178343&r1=1178342&r2=1178343&view=diff
==============================================================================
--- directory/shared/trunk/i18n/src/main/resources/org/apache/directory/shared/i18n/errors.properties
(original)
+++ directory/shared/trunk/i18n/src/main/resources/org/apache/directory/shared/i18n/errors.properties
Mon Oct  3 08:56:32 2011
@@ -122,6 +122,9 @@ ERR_03038=The attribute requestID can''t
 ERR_03039=the given requestID is not an integer
 ERR_03040=unable to find the batch request
 
+# dsml-parser
+ERR_03101_MISSING_CONNECTION_TO BIND=Missing connection, can not bind
+
 # ldap
 ERR_04001_NULL_IDENTIFICATION_TAG=identificationTag parameter is null
 ERR_04002_BAD_PRECENDENCE=precedence parameter not in [0-255] : {0}



Mime
View raw message