Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 67068986F for ; Thu, 24 Nov 2011 15:33:02 +0000 (UTC) Received: (qmail 94114 invoked by uid 500); 24 Nov 2011 15:33:01 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 94040 invoked by uid 500); 24 Nov 2011 15:33:01 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 94033 invoked by uid 99); 24 Nov 2011 15:33:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Nov 2011 15:33:01 +0000 X-ASF-Spam-Status: No, hits=-2001.2 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Nov 2011 15:33:00 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id E7AB49C98F for ; Thu, 24 Nov 2011 15:32:39 +0000 (UTC) Date: Thu, 24 Nov 2011 15:32:39 +0000 (UTC) From: "Robert Muir (Commented) (JIRA)" To: dev@lucene.apache.org Message-ID: <125703901.9977.1322148759950.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1673208688.9801.1322144439913.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (LUCENE-3590) minimize bytesref to be a ref to a byte[] MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LUCENE-3590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13156760#comment-13156760 ] Robert Muir commented on LUCENE-3590: ------------------------------------- {quote} BytesRef copy = BytesRef.copyOf(original); {quote} I still think this is slightly confusing, because in my opinion this method should do: {noformat} BytesRef copy = new BytesRef(); copy.bytes = other.bytes; copy.length = other.length; copy.offset = other.offset; {noformat} I think we should clearly separate these 'deep copies', e.g. deepCopyOf would be better. > minimize bytesref to be a ref to a byte[] > ----------------------------------------- > > Key: LUCENE-3590 > URL: https://issues.apache.org/jira/browse/LUCENE-3590 > Project: Lucene - Java > Issue Type: Bug > Affects Versions: 4.0 > Reporter: Robert Muir > Priority: Blocker > > Setting this as blocker for 4.0, as this class is used in every API there. > Currently this API is a little of a everything, sometimes its like a stringbuffer, it > does numeric conversions, all kinds of stuff. > We need this to be a ref to a byte[], nothing else. This other stuff can go somewhere else. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org