Return-Path: Delivered-To: apmail-lucene-hadoop-dev-archive@locus.apache.org Received: (qmail 99796 invoked from network); 31 May 2007 20:29:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 31 May 2007 20:29:38 -0000 Received: (qmail 70302 invoked by uid 500); 31 May 2007 20:29:41 -0000 Delivered-To: apmail-lucene-hadoop-dev-archive@lucene.apache.org Received: (qmail 70274 invoked by uid 500); 31 May 2007 20:29:40 -0000 Mailing-List: contact hadoop-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hadoop-dev@lucene.apache.org Delivered-To: mailing list hadoop-dev@lucene.apache.org Received: (qmail 70265 invoked by uid 99); 31 May 2007 20:29:40 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 May 2007 13:29:40 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 May 2007 13:29:36 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id C2F67714182 for ; Thu, 31 May 2007 13:29:15 -0700 (PDT) Message-ID: <5270924.1180643355796.JavaMail.jira@brutus> Date: Thu, 31 May 2007 13:29:15 -0700 (PDT) From: "Doug Cutting (JIRA)" To: hadoop-dev@lucene.apache.org Subject: [jira] Updated: (HADOOP-1311) Bug in BytesWritable.set(byte[] newData, int offset, int length) In-Reply-To: <5205601.1178057236136.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HADOOP-1311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Doug Cutting updated HADOOP-1311: --------------------------------- Status: Open (was: Patch Available) The final parameter to arraycopy should be 'length', not 'size', right? > Bug in BytesWritable.set(byte[] newData, int offset, int length) > ----------------------------------------------------------------- > > Key: HADOOP-1311 > URL: https://issues.apache.org/jira/browse/HADOOP-1311 > Project: Hadoop > Issue Type: Bug > Components: io > Environment: N/A > Reporter: Srikanth Kakani > Attachments: bytesWritable.patch > > > Current implementation: > public void set(byte[] newData, int offset, int length) { > setSize(0); > setSize(length); > System.arraycopy(newData, 0, bytes, 0, size); > } > Correct implementation: > public void set(byte[] newData, int offset, int length) { > setSize(0); > setSize(length); > System.arraycopy(newData, offset, bytes, 0, size); > } > please fix. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.