Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 47618200B17 for ; Tue, 21 Jun 2016 18:43:57 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 456C4160A4F; Tue, 21 Jun 2016 16:43:57 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 8CBE7160A07 for ; Tue, 21 Jun 2016 18:43:56 +0200 (CEST) Received: (qmail 93803 invoked by uid 500); 21 Jun 2016 16:43:55 -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 93794 invoked by uid 99); 21 Jun 2016 16:43:55 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Jun 2016 16:43:55 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 3A73AC3B0C for ; Tue, 21 Jun 2016 16:43:55 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.43 X-Spam-Level: X-Spam-Status: No, score=-0.43 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-1.43] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id DJazvOKNmECw for ; Tue, 21 Jun 2016 16:43:54 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 10B715FB39 for ; Tue, 21 Jun 2016 16:43:54 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 0BA23E0309 for ; Tue, 21 Jun 2016 16:43:52 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 3163F3A06E1 for ; Tue, 21 Jun 2016 16:43:52 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1749571 - /directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/filter/FilterParser.java Date: Tue, 21 Jun 2016 16:43:51 -0000 To: commits@directory.apache.org From: elecharny@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20160621164352.3163F3A06E1@svn01-us-west.apache.org> archived-at: Tue, 21 Jun 2016 16:43:57 -0000 Author: elecharny Date: Tue Jun 21 16:43:51 2016 New Revision: 1749571 URL: http://svn.apache.org/viewvc?rev=1749571&view=rev Log: o Store the value as a byte[] when we aren't schema aware Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/filter/FilterParser.java Modified: directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/filter/FilterParser.java URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/filter/FilterParser.java?rev=1749571&r1=1749570&r2=1749571&view=diff ============================================================================== --- directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/filter/FilterParser.java (original) +++ directory/shared/branches/shared-value/ldap/model/src/main/java/org/apache/directory/api/ldap/model/filter/FilterParser.java Tue Jun 21 16:43:51 2016 @@ -369,7 +369,10 @@ public final class FilterParser if ( attributeType == null ) { - return new Value( Strings.utf8ToString( value, current ) ); + byte[] bytes = new byte[current]; + System.arraycopy( value, 0, bytes, 0, current ); + + return new Value( bytes ); } if ( attributeType.getSyntax().isHumanReadable() ) @@ -386,7 +389,10 @@ public final class FilterParser } else { - return new Value( Strings.utf8ToString( value, current ) ); + byte[] bytes = new byte[current]; + System.arraycopy( value, 0, bytes, 0, current ); + + return new Value( bytes ); } } else @@ -712,7 +718,7 @@ public final class FilterParser } else { - return new EqualityNode( attribute, value.getValue() ); + return new EqualityNode( attribute, value.getBytes() ); } case '*' : @@ -1001,7 +1007,6 @@ public final class FilterParser // This is an item node = parseItem( schemaManager, filterBytes, pos, b, relaxed ); break; - } return node;