When trying to parse a document with more then one text pieces, for example the text encoding is different for different parts in the text, only the first piece is stored in the BTreeSet. After some digging I saw that TextPiece.compare always returned 0 which cause the BTree to think that it was the same piece again. A simple change would be to call the super.compare method in util.PropertyNode. //staffan
can you submit a patch? http://jakarta.apache.org/poi/getinvolved/index.html It would be easier that way.
Here is a patch, hope it works. //staffan Index: TextPiece.java =================================================================== RCS file: /home/cvspublic/jakarta-poi/src/scratchpad/src/org/apache/poi/hdf/extractor/Text Piece.java,v retrieving revision 1.1 diff -r1.1 TextPiece.java 85c85 < return 0; --- > return super.compareTo(obj);
Anybody have a unit test for this? dont want to mess the code without one.
agreed. Also follow the directions on "getinvolved" Patches pasted are patches wasted (and wrapped)
see HWPF..