You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by fa...@apache.org on 2022/11/04 09:13:05 UTC
svn commit: r1905062 - in /poi/trunk/poi-scratchpad/src: main/java/org/apache/poi/hsmf/datatypes/PropertiesChunk.java test/java/org/apache/poi/hsmf/TestFileRead.java
Author: fanningpj
Date: Fri Nov 4 09:13:05 2022
New Revision: 1905062
URL: http://svn.apache.org/viewvc?rev=1905062&view=rev
Log:
[bug-66335] apply rest of fix
Modified:
poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hsmf/datatypes/PropertiesChunk.java
poi/trunk/poi-scratchpad/src/test/java/org/apache/poi/hsmf/TestFileRead.java
Modified: poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hsmf/datatypes/PropertiesChunk.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hsmf/datatypes/PropertiesChunk.java?rev=1905062&r1=1905061&r2=1905062&view=diff
==============================================================================
--- poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hsmf/datatypes/PropertiesChunk.java (original)
+++ poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hsmf/datatypes/PropertiesChunk.java Fri Nov 4 09:13:05 2022
@@ -255,7 +255,7 @@ public abstract class PropertiesChunk ex
// to another chunk which holds the data itself
boolean isPointer = false;
int length = type.getLength();
- if (!type.isFixedLength()) {
+ if (type.isPointer()) {
isPointer = true;
length = 8;
}
@@ -380,7 +380,7 @@ public abstract class PropertiesChunk ex
LittleEndian.putUInt(value.getFlags(), out); // readable + writable
MAPIType type = getTypeMapping(value.getActualType());
- if (type.isFixedLength()) {
+ if (type.isFixedLength() && !type.isPointer()) {
// page 11, point 2.1.2
writeFixedLengthValueHeader(out, property, type, value);
} else {
Modified: poi/trunk/poi-scratchpad/src/test/java/org/apache/poi/hsmf/TestFileRead.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi-scratchpad/src/test/java/org/apache/poi/hsmf/TestFileRead.java?rev=1905062&r1=1905061&r2=1905062&view=diff
==============================================================================
--- poi/trunk/poi-scratchpad/src/test/java/org/apache/poi/hsmf/TestFileRead.java (original)
+++ poi/trunk/poi-scratchpad/src/test/java/org/apache/poi/hsmf/TestFileRead.java Fri Nov 4 09:13:05 2022
@@ -12,8 +12,7 @@ public class TestFileRead {
void bug66335() throws IOException {
try (MAPIMessage mapiMessage = new MAPIMessage(
POIDataSamples.getHSMFInstance().getFile("bug66335.msg"))) {
- // 25 is not the right number of properties but it is what the existing code finds
- assertEquals(25, mapiMessage.getMainChunks().getProperties().size());
+ assertEquals(151, mapiMessage.getMainChunks().getProperties().size());
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org