You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2013/05/08 15:24:58 UTC

svn commit: r1480268 - /directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/filter/LeafNode.java

Author: elecharny
Date: Wed May  8 13:24:56 2013
New Revision: 1480268

URL: http://svn.apache.org/r1480268
Log:
Throw a NPE if we try to create a LeafNode with a null Attribute (DIRSERVER-1707)

Modified:
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/filter/LeafNode.java

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/filter/LeafNode.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/filter/LeafNode.java?rev=1480268&r1=1480267&r2=1480268&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/filter/LeafNode.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/filter/LeafNode.java Wed May  8 13:24:56 2013
@@ -28,7 +28,7 @@ import org.apache.directory.api.ldap.mod
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class LeafNode extends AbstractExprNode
+public abstract class LeafNode extends AbstractExprNode
 {
     /** attributeType on which this leaf is based */
     protected AttributeType attributeType;
@@ -53,6 +53,10 @@ public class LeafNode extends AbstractEx
             this.attribute = attributeType.getName();
             isSchemaAware = true;
         }
+        else
+        {
+            throw new NullPointerException( "Cannot create a Node with a null Attribute" );
+        }
     }