DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21775>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21775 Non-MS Office Docs with Valid Header Signature ------- Additional Comments From [EMAIL PROTECTED] 2003-07-21 18:14 ------- Here's what I've figured out. I'll let you decide which it is. If I spin through all the properties that I get back, the following is returned for the word count (ID#15 according to the PropertyIDMap.PID_WORDCOUNT constant); element 13 in the array of properties). DocumentPropertyReader - props[13].getID() = 15 DocumentPropertyReader - props[13].getType() = 0 DocumentPropertyReader - props[13].getValue() = [EMAIL PROTECTED] DocumentPropertyReader - props[13].getValue().getClass() = class [B The type that's created here (in the default of the switch in the org.apache.poi.hpsf.Property constructor based on the return of org.apache.poi.hpsf.littleendian.DWord.intValue()) means that value was not recognized as a Variant.VT_I4. Instead, it's a zero == VT_EMPTY. This gets put into the properties as a byte array which causes the ClassCastException when calling getWordCount(). I'm not sure (not knowing the nuts and bolts) if the Corel doc is actually behaving properly as an OLE2 doc. If it isn't, I guess the problem is that POIFS thinks it is. If it is, the the problem is either that the VT_EMPTY doesn't get treated as a null OR that the getWordCount() doesn't propertly take this into account. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
