From f7c4357daec35474c82bc6ed7fcd1c61332c0f26 Mon Sep 17 00:00:00 2001 From: Tim Allison Date: Tue, 21 Mar 2017 00:13:11 +0000 Subject: [PATCH] 60881 -- strip out system.set props for local test. git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1787891 13f79535-47bb-0310-9956-ffa450edef68 --- src/ooxml/java/org/apache/poi/xssf/binary/XSSFBParser.java | 2 +- .../org/apache/poi/poifs/crypt/TestSecureTempZip.java | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) 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