directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r493147 - in /directory/trunks/shared/ldap/src: main/antlr/filter-parser.g test/java/org/apache/directory/shared/ldap/filter/FilterParserImplTest.java
Date Fri, 05 Jan 2007 19:19:03 GMT
Author: akarasulu
Date: Fri Jan  5 11:19:02 2007
New Revision: 493147

URL: http://svn.apache.org/viewvc?view=rev&rev=493147
Log:
MERGE(493145) from 0.9.5 branch: fixing bug where recognition exceptions were being swallowed
up by the default error handler of the filter parser

Modified:
    directory/trunks/shared/ldap/src/main/antlr/filter-parser.g
    directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/filter/FilterParserImplTest.java

Modified: directory/trunks/shared/ldap/src/main/antlr/filter-parser.g
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/antlr/filter-parser.g?view=diff&rev=493147&r1=493146&r2=493147
==============================================================================
--- directory/trunks/shared/ldap/src/main/antlr/filter-parser.g (original)
+++ directory/trunks/shared/ldap/src/main/antlr/filter-parser.g Fri Jan  5 11:19:02 2007
@@ -52,6 +52,7 @@
 {
     k = 5;
 	importVocab = FilterLexer;
+	defaultErrorHandler=false;
 }
 
 

Modified: directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/filter/FilterParserImplTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/filter/FilterParserImplTest.java?view=diff&rev=493147&r1=493146&r2=493147
==============================================================================
--- directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/filter/FilterParserImplTest.java
(original)
+++ directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/filter/FilterParserImplTest.java
Fri Jan  5 11:19:02 2007
@@ -175,6 +175,21 @@
     }
 
 
+    public void testBadEqualsFilter() throws IOException, ParseException
+    {
+        try
+        {
+            parser.parse( "ou = people" );
+            
+            // The parsing should fail
+            fail( "should fail with bad filter" );
+        }
+        catch( ParseException pe )
+        {
+        }
+    }
+
+
     public void testEqualsWithForwardSlashFilter() throws IOException, ParseException
     {
         SimpleNode node = ( SimpleNode ) parser.parse( "( ou = people/in/my/company )" );



Mime
View raw message