directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1480268 - /directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/filter/LeafNode.java
Date Wed, 08 May 2013 13:24:58 GMT
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"
);
+        }
     }
 
 



Mime
View raw message