directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r265614 - /directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/filter/BranchNode.java
Date Thu, 01 Sep 2005 01:35:41 GMT
Author: akarasulu
Date: Wed Aug 31 18:35:38 2005
New Revision: 265614

URL: http://svn.apache.org/viewcvs?rev=265614&view=rev
Log:
preventing index out of bounds exception

Modified:
    directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/filter/BranchNode.java

Modified: directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/filter/BranchNode.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/filter/BranchNode.java?rev=265614&r1=265613&r2=265614&view=diff
==============================================================================
--- directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/filter/BranchNode.java
(original)
+++ directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/filter/BranchNode.java
Wed Aug 31 18:35:38 2005
@@ -158,7 +158,12 @@
      */
     public ExprNode getChild()
     {
-        return ( ExprNode ) m_children.get( 0 ) ;
+        if ( m_children.size() > 0 )
+        {
+            return ( ExprNode ) m_children.get( 0 ) ;
+        }
+
+        return null;
     }
 
 



Mime
View raw message