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 56BD1928D for ; Sat, 31 Mar 2012 11:16:50 +0000 (UTC) Received: (qmail 30606 invoked by uid 500); 31 Mar 2012 11:16:49 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 30531 invoked by uid 500); 31 Mar 2012 11:16:49 -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 30516 invoked by uid 99); 31 Mar 2012 11:16:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 31 Mar 2012 11:16:49 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_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; Sat, 31 Mar 2012 11:16:46 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id BD7F934D19A for ; Sat, 31 Mar 2012 11:16:25 +0000 (UTC) Date: Sat, 31 Mar 2012 11:16:25 +0000 (UTC) From: "Uwe Schindler (Reopened) (JIRA)" To: dev@lucene.apache.org Message-ID: <860182752.706.1333192585777.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <237944330.11600.1328017810147.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Reopened] (LUCENE-3738) Be consistent about negative vInt/vLong 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-3738?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Uwe Schindler reopened LUCENE-3738: ----------------------------------- > Be consistent about negative vInt/vLong > --------------------------------------- > > Key: LUCENE-3738 > URL: https://issues.apache.org/jira/browse/LUCENE-3738 > Project: Lucene - Java > Issue Type: Bug > Reporter: Michael McCandless > Assignee: Uwe Schindler > Fix For: 3.6, 4.0 > > Attachments: ByteArrayDataInput.java.patch, LUCENE-3738-improvement.patch, LUCENE-3738.patch, LUCENE-3738.patch, LUCENE-3738.patch, LUCENE-3738.patch, LUCENE-3738.patch > > > Today, write/readVInt "allows" a negative int, in that it will encode and decode correctly, just horribly inefficiently (5 bytes). > However, read/writeVLong fails (trips an assert). > I'd prefer that both vInt/vLong trip an assert if you ever try to write a negative number... it's badly trappy today. But, unfortunately, we sometimes rely on this... had we had this assert in 'since the beginning' we could have avoided that. > So, if we can't add that assert in today, I think we should at least fix readVLong to handle negative longs... but then you quietly spend 9 bytes (even more trappy!). -- 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