ToralfNiebuhr opened a new issue, #1051:
URL: https://github.com/apache/poi/issues/1051

   If I create a new HSSFWorkbook without a template.
   Like
   `HSSFWorkbook wb = new HSSFWorkbook();
         wb.write(new FileOutputStream("testfile"));`
   
   Then, all versions above "5.0.1" create this warning
   `08:38:09,198  WARN POIDocument - DocumentSummaryInformation property set 
came back as null
   08:38:09,205  WARN POIDocument - SummaryInformation property set came back 
as null`
   
   
   The cause is, that when "getBytes()" is called; then 
[updateEncryptionInfo](https://github.com/apache/poi/blob/e6a04b49211e23c704fcdbe524d99d2f4486b083/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java#L2436-L2438)
 calls `readProperties()` from an empty POIDocument. The missing Records are 
only added later in getBytes(), when they are read from the internal wb.
   
   I don't know what the correct fix is here. Replace `readProperties()` with 
`readProperties(false)` (same behavior as in older versions)
   Or, updateEncryptionInfo working agains the wb, or calling 
updateEncryptionInfo later.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to