Return-Path: Delivered-To: apmail-directory-commits-archive@www.apache.org Received: (qmail 39785 invoked from network); 25 Mar 2005 00:05:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 25 Mar 2005 00:05:44 -0000 Received: (qmail 69093 invoked by uid 500); 25 Mar 2005 00:05:43 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 69056 invoked by uid 500); 25 Mar 2005 00:05:43 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 69042 invoked by uid 99); 25 Mar 2005 00:05:43 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Thu, 24 Mar 2005 16:05:42 -0800 Received: (qmail 39731 invoked by uid 65534); 25 Mar 2005 00:05:41 -0000 Message-ID: <20050325000541.39730.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mailer: svnmailer-1.0.0-dev Date: Fri, 25 Mar 2005 00:05:41 -0000 Subject: svn commit: r158971 - directory/shared/ldap/trunk/common/src/test/org/apache/ldap/common/filter/FilterParserImplTest.java To: commits@directory.apache.org From: akarasulu@apache.org X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: akarasulu Date: Thu Mar 24 16:05:40 2005 New Revision: 158971 URL: http://svn.apache.org/viewcvs?view=3Drev&rev=3D158971 Log: Reversing my last commit. I missunderstood the issue it seems: http://issue= s=2Eapache.org/jira/browse/DIRLDAP-38 Modified: directory/shared/ldap/trunk/common/src/test/org/apache/ldap/common/filt= er/FilterParserImplTest.java Modified: directory/shared/ldap/trunk/common/src/test/org/apache/ldap/commo= n/filter/FilterParserImplTest.java URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/common/src/t= est/org/apache/ldap/common/filter/FilterParserImplTest.java?view=3Ddiff&r1= =3D158970&r2=3D158971 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- directory/shared/ldap/trunk/common/src/test/org/apache/ldap/common/filt= er/FilterParserImplTest.java (original) +++ directory/shared/ldap/trunk/common/src/test/org/apache/ldap/common/filt= er/FilterParserImplTest.java Thu Mar 24 16:05:40 2005 @@ -574,65 +574,6 @@ } =20 =20 - /** Filter From http://issues.apache.org/jira/browse/DIRLDAP-38 */ - public static final String REARRANGING_FILTER =3D "(& (a=3DA) (| (b=3D= B) (c=3DC) ) )"; - - - /** - * Test case for problem described in http://issues.apache.org/jira/br= owse/DIRLDAP-38. - * - * @throws IOException when parser cannot form pipe - * @throws ParseException when parsing bad input - */ - public void testFilterRearrangement() throws IOException, ParseExcepti= on - { -// From http://issues.apache.org/jira/browse/DIRLDAP-38 -// -// (& (a=3DA) (| (b=3DB) (c=3DC) ) ) -// -// The resulting expression object after the BER parser is finished= is: -// -// (& (| (c=3DC) (b=3DB) (a=3DA) ) ) - - // let's just try printing out first using a standard visitor - - FilterParserImpl parser =3D new FilterParserImpl(); - - ExprNode rootNode =3D parser.parse( REARRANGING_FILTER ); - - StringBuffer buf =3D new StringBuffer(); - - rootNode.printToBuffer( buf ); - - String regenerated =3D buf.toString().trim(); - - assertEquals( REARRANGING_FILTER, regenerated ); - - System.err.println( regenerated ); - - // let's now try normalizing then printing out: start with fresh s= tuff - - parser =3D new FilterParserImpl(); - - rootNode =3D parser.parse( REARRANGING_FILTER ); - - buf =3D new StringBuffer(); - - BranchNormalizedVisitor visitor =3D new BranchNormalizedVisitor(); - - visitor.visit( rootNode ); - - rootNode.printToBuffer( buf ); - - regenerated =3D buf.toString().trim(); - - assertEquals( REARRANGING_FILTER, regenerated ); - - System.err.println( regenerated ); - - } - - /* @todo look at custom error handlers for the parser */ /////// Causes parser to hang rather than really bombing out. Looks l= ike /////// we may need to implement a custom error handler for this parse= r=2E