diff options
author | Jason Height <jheight@apache.org> | 2003-10-14 06:54:00 +0000 |
---|---|---|
committer | Jason Height <jheight@apache.org> | 2003-10-14 06:54:00 +0000 |
commit | b77c9c5f45c8141d711fcea667a83c8af1292557 (patch) | |
tree | 0ee46b8b26dfc539e7d7e0903d6fcdce5e0b2a5a /src/testcases/org/apache/poi/hssf | |
parent | 1eb2a0932eea79463163b04be140f18a3d39c904 (diff) | |
download | poi-b77c9c5f45c8141d711fcea667a83c8af1292557.tar.gz poi-b77c9c5f45c8141d711fcea667a83c8af1292557.zip |
Fixed the double byte bugs in SSTDeserializer. Testcases provided in bugs 15556 and 22742 now work.
Patch for the rel 2.0 branch will follow shortly.
PR: 15556, 22742
Obtained from:
Submitted by:
Reviewed by:
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353395 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org/apache/poi/hssf')
-rw-r--r-- | src/testcases/org/apache/poi/hssf/record/TestSSTDeserializer.java | 10 | ||||
-rw-r--r-- | src/testcases/org/apache/poi/hssf/record/TestSSTRecord.java | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/testcases/org/apache/poi/hssf/record/TestSSTDeserializer.java b/src/testcases/org/apache/poi/hssf/record/TestSSTDeserializer.java index 6272653202..a506e37c11 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestSSTDeserializer.java +++ b/src/testcases/org/apache/poi/hssf/record/TestSSTDeserializer.java @@ -88,7 +88,7 @@ public class TestSSTDeserializer byte[] bytes = HexRead.readData( _test_file_path + File.separator + "richtextdata.txt", "header" ); BinaryTree strings = new BinaryTree(); SSTDeserializer deserializer = new SSTDeserializer( strings ); - deserializer.manufactureStrings( bytes, 0, (short)bytes.length ); + deserializer.manufactureStrings( bytes, 0); byte[] continueBytes = HexRead.readData( _test_file_path + File.separator + "richtextdata.txt", "continue1" ); deserializer.processContinueRecord( continueBytes ); @@ -101,7 +101,7 @@ public class TestSSTDeserializer byte[] bytes = HexRead.readData( _test_file_path + File.separator + "evencontinuation.txt", "header" ); BinaryTree strings = new BinaryTree(); SSTDeserializer deserializer = new SSTDeserializer( strings ); - deserializer.manufactureStrings( bytes, 0, (short)bytes.length ); + deserializer.manufactureStrings( bytes, 0); byte[] continueBytes = HexRead.readData( _test_file_path + File.separator + "evencontinuation.txt", "continue1" ); deserializer.processContinueRecord( continueBytes ); @@ -119,7 +119,7 @@ public class TestSSTDeserializer byte[] bytes = HexRead.readData( _test_file_path + File.separator + "stringacross2continuations.txt", "header" ); BinaryTree strings = new BinaryTree(); SSTDeserializer deserializer = new SSTDeserializer( strings ); - deserializer.manufactureStrings( bytes, 0, (short)bytes.length ); + deserializer.manufactureStrings( bytes, 0); bytes = HexRead.readData( _test_file_path + File.separator + "stringacross2continuations.txt", "continue1" ); deserializer.processContinueRecord( bytes ); bytes = HexRead.readData( _test_file_path + File.separator + "stringacross2continuations.txt", "continue2" ); @@ -136,7 +136,7 @@ public class TestSSTDeserializer byte[] bytes = HexRead.readData( _test_file_path + File.separator + "extendedtextstrings.txt", "rich-header" ); BinaryTree strings = new BinaryTree(); SSTDeserializer deserializer = new SSTDeserializer( strings ); - deserializer.manufactureStrings( bytes, 0, (short)bytes.length ); + deserializer.manufactureStrings( bytes, 0); byte[] continueBytes = HexRead.readData( _test_file_path + File.separator + "extendedtextstrings.txt", "rich-continue1" ); deserializer.processContinueRecord( continueBytes ); @@ -146,7 +146,7 @@ public class TestSSTDeserializer bytes = HexRead.readData( _test_file_path + File.separator + "extendedtextstrings.txt", "norich-header" ); strings = new BinaryTree(); deserializer = new SSTDeserializer( strings ); - deserializer.manufactureStrings( bytes, 0, (short)bytes.length ); + deserializer.manufactureStrings( bytes, 0); continueBytes = HexRead.readData( _test_file_path + File.separator + "extendedtextstrings.txt", "norich-continue1" ); deserializer.processContinueRecord( continueBytes ); diff --git a/src/testcases/org/apache/poi/hssf/record/TestSSTRecord.java b/src/testcases/org/apache/poi/hssf/record/TestSSTRecord.java index 24105993dd..747868c98a 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestSSTRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestSSTRecord.java @@ -429,7 +429,7 @@ public class TestSSTRecord assertEquals( 1464, record.getNumStrings() ); assertEquals( 688, record.getNumUniqueStrings() ); assertEquals( 492, record.countStrings() ); - assertEquals( 1, record.getDeserializer().getContinuationExpectedChars() ); +//jmh assertEquals( 1, record.getDeserializer().getContinuationExpectedChars() ); assertEquals( "Consolidated B-24J Liberator The Dragon & His Tai", record.getDeserializer().getUnfinishedString() ); // assertEquals( 52, record.getDeserializer().getTotalLength() ); @@ -448,7 +448,7 @@ public class TestSSTRecord assertEquals( 0, record.getNumStrings() ); assertEquals( 0, record.getNumUniqueStrings() ); assertEquals( 0, record.countStrings() ); - assertEquals( 0, record.getDeserializer().getContinuationExpectedChars() ); + assertEquals( 0, record.getDeserializer().getContinuationCharsRead() ); assertEquals( "", record.getDeserializer().getUnfinishedString() ); // assertEquals( 0, record.getDeserializer().getTotalLength() ); // assertEquals( 0, record.getDeserializer().getStringDataOffset() ); |