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 2005/10/26 23:10:40 UTC
svn commit: r328734 -
/directory/shared/ldap/branches/shared-ldap-utf8/common/src/java/org/apache/ldap/common/filter/SimpleNode.java
Author: elecharny
Date: Wed Oct 26 14:10:36 2005
New Revision: 328734
URL: http://svn.apache.org/viewcvs?rev=328734&view=rev
Log:
changed the value's type from String to byte[]
Modified:
directory/shared/ldap/branches/shared-ldap-utf8/common/src/java/org/apache/ldap/common/filter/SimpleNode.java
Modified: directory/shared/ldap/branches/shared-ldap-utf8/common/src/java/org/apache/ldap/common/filter/SimpleNode.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/branches/shared-ldap-utf8/common/src/java/org/apache/ldap/common/filter/SimpleNode.java?rev=328734&r1=328733&r2=328734&view=diff
==============================================================================
--- directory/shared/ldap/branches/shared-ldap-utf8/common/src/java/org/apache/ldap/common/filter/SimpleNode.java (original)
+++ directory/shared/ldap/branches/shared-ldap-utf8/common/src/java/org/apache/ldap/common/filter/SimpleNode.java Wed Oct 26 14:10:36 2005
@@ -16,6 +16,10 @@
*/
package org.apache.ldap.common.filter ;
+import java.util.Arrays;
+
+import org.apache.asn1new.util.StringUtils;
+
/**
* A simple assertion value node.
@@ -26,7 +30,7 @@
public class SimpleNode extends LeafNode
{
/** the value */
- private String value ;
+ private byte[] value ;
/**
@@ -36,7 +40,7 @@
* @param value the value to test for
* @param type the type of the assertion
*/
- public SimpleNode( String attribute, String value, int type )
+ public SimpleNode( String attribute, byte[] value, int type )
{
super( attribute, type ) ;
this.value = value ;
@@ -79,7 +83,7 @@
*
* @return the value
*/
- public final String getValue()
+ public final byte[] getValue()
{
return value ;
}
@@ -90,7 +94,7 @@
*
* @param value the value for this node
*/
- public void setValue( String value )
+ public void setValue( byte[] value )
{
this.value = value;
}
@@ -127,7 +131,9 @@
}
- buf.append( value ) ;
+ buf.append( StringUtils.toUtf8( value ) );
+ buf.append( '/' );
+ buf.append( StringUtils.dumpBytes( value ) );
buf.append( ')' ) ;
if ( ( null != getAnnotations() )
@@ -195,6 +201,6 @@
return false;
}
- return value.equals( ( ( SimpleNode ) other ).getValue() );
+ return Arrays.equals( value, ( ( ( SimpleNode ) other ).getValue() ) );
}
}