diff --git a/src/ooxml/java/org/apache/poi/xssf/binary/XSSFBParser.java b/src/ooxml/java/org/apache/poi/xssf/binary/XSSFBParser.java index 2dd9caed28..4f4fc81ff4 100644 --- a/src/ooxml/java/org/apache/poi/xssf/binary/XSSFBParser.java +++ b/src/ooxml/java/org/apache/poi/xssf/binary/XSSFBParser.java @@ -71,7 +71,7 @@ public abstract class XSSFBParser { byte b2 = is.readByte(); b1 &= ~(1<<7); //unset highest bit b2 &= ~(1<<7); //unset highest bit (if it exists?) - recordId = (128*(int)b2)+(int)b1; + recordId = ((int)b2 << 7)+(int)b1; } else { recordId = (int)b1; } diff --git a/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSecureTempZip.java b/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSecureTempZip.java index 6bf83404e5..d994744774 100644 --- a/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSecureTempZip.java +++ b/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSecureTempZip.java @@ -41,9 +41,6 @@ import org.junit.Test; public class TestSecureTempZip { - static { - System.setProperty("POI.testdata.path", "C:/users/tallison/idea projects/poi-trunk/test-data"); - } /** * Test case for #59841 - this is an example on how to use encrypted temp files, * which are streamed into POI opposed to having everything in memory