poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 51458] New: sign extension may cause error in BitField
Date Fri, 01 Jul 2011 09:54:57 GMT

             Bug #: 51458
           Summary: sign extension may cause error in BitField
           Product: POI
           Version: 3.8-dev
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: POI Overall
        AssignedTo: dev@poi.apache.org
        ReportedBy: jingqi.se@gmail.com
    Classification: Unclassified

Created attachment 27233
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=27233
use cycle right shifting instead of just right shifting

the following junit test will fail,

final BitField bf1 = new BitField(0xF), bf2 = new BitField(0xF0000000);
int a = 0;
a = bf1.setValue(a, 9);
a = bf2.setValue(a, 9);
assertEquals(9, bf1.getValue(a));
assertEquals(9, bf2.getValue(a)); // fails, actually get -7

this bug haven't affected POI, just may cause error in future

Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org

View raw message