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/12/08 23:10:13 UTC
svn commit: r355235 - in
/directory/shared/ldap/trunk/common/src/main/java/org/apache/ldap/common/message:
CompareRequest.java CompareRequestImpl.java
Author: elecharny
Date: Thu Dec 8 14:10:08 2005
New Revision: 355235
URL: http://svn.apache.org/viewcvs?rev=355235&view=rev
Log:
Changed the AssertionValue fromm String to byte[]
Modified:
directory/shared/ldap/trunk/common/src/main/java/org/apache/ldap/common/message/CompareRequest.java
directory/shared/ldap/trunk/common/src/main/java/org/apache/ldap/common/message/CompareRequestImpl.java
Modified: directory/shared/ldap/trunk/common/src/main/java/org/apache/ldap/common/message/CompareRequest.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/common/src/main/java/org/apache/ldap/common/message/CompareRequest.java?rev=355235&r1=355234&r2=355235&view=diff
==============================================================================
--- directory/shared/ldap/trunk/common/src/main/java/org/apache/ldap/common/message/CompareRequest.java (original)
+++ directory/shared/ldap/trunk/common/src/main/java/org/apache/ldap/common/message/CompareRequest.java Thu Dec 8 14:10:08 2005
@@ -65,7 +65,7 @@
*
* @return the attribute value to used in comparison.
*/
- String getAssertionValue() ;
+ byte[] getAssertionValue() ;
/**
* Sets the attribute value to use in the comparison.
Modified: directory/shared/ldap/trunk/common/src/main/java/org/apache/ldap/common/message/CompareRequestImpl.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/common/src/main/java/org/apache/ldap/common/message/CompareRequestImpl.java?rev=355235&r1=355234&r2=355235&view=diff
==============================================================================
--- directory/shared/ldap/trunk/common/src/main/java/org/apache/ldap/common/message/CompareRequestImpl.java (original)
+++ directory/shared/ldap/trunk/common/src/main/java/org/apache/ldap/common/message/CompareRequestImpl.java Thu Dec 8 14:10:08 2005
@@ -16,7 +16,7 @@
*/
package org.apache.ldap.common.message;
-import java.io.UnsupportedEncodingException;
+import java.util.Arrays;
import org.apache.asn1.codec.util.StringUtils;
@@ -92,19 +92,9 @@
*
* @return the attribute value to used in comparison.
*/
- public byte[] getAssertionValueValue()
+ public byte[] getAssertionValue()
{
- return attrVal;
- }
-
- /**
- * Gets the attribute value to use in making the comparison.
- *
- * @return the attribute value to used in comparison.
- */
- public String getAssertionValue()
- {
- return StringUtils.utf8ToString( attrVal );
+ return attrVal;
}
/**
@@ -241,14 +231,7 @@
if ( attrVal != null && req.getAssertionValue() != null )
{
- try
- {
- if ( ! new String( attrVal, "UTF-8").equals( req.getAssertionValue() ) )
- {
- return false;
- }
- }
- catch ( UnsupportedEncodingException uee )
+ if ( ! Arrays.equals( attrVal, req.getAssertionValue() ) )
{
return false;
}