Author: kiwiwings
Date: Sun Mar 1 22:20:38 2020
New Revision: 1874671
URL: http://svn.apache.org/viewvc?rev=1874671&view=rev
Log:
#64186 - Decrease usage of ThreadLocals in XML Signature API
Added:
poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/SignatureMarshalDefaultListener.java
(with props)
poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/facets/SignatureFacetHelper.java
(with props)
Modified:
poi/site/src/documentation/content/xdocs/changes.xml
poi/site/src/documentation/content/xdocs/encryption.xml
poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/OOXMLURIDereferencer.java
poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/SignatureConfig.java
poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/SignatureInfo.java
poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/SignatureMarshalListener.java
poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/SignaturePart.java
poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/facets/EnvelopedSignatureFacet.java
poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/facets/KeyInfoSignatureFacet.java
poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/facets/OOXMLSignatureFacet.java
poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/facets/Office2010SignatureFacet.java
poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/facets/SignatureFacet.java
poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/facets/XAdESSignatureFacet.java
poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/facets/XAdESXLSignatureFacet.java
poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/services/TSPTimeStampService.java
poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/services/TimeStampService.java
poi/trunk/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java
Modified: poi/site/src/documentation/content/xdocs/changes.xml
URL:
http://svn.apache.org/viewvc/poi/site/src/documentation/content/xdocs/changes.xml?rev=1874671&r1=1874670&r2=1874671&view=diff
==============================================================================
--- poi/site/src/documentation/content/xdocs/changes.xml (original)
+++ poi/site/src/documentation/content/xdocs/changes.xml Sun Mar 1 22:20:38
2020
@@ -1,5 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
+<?xml version="1.0" encoding="UTF-8"?><!--
====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -47,7 +46,6 @@
<context id="POIFS" title="Poor Obfuscation Implementation
FileSystem"/>
</contexts>
-
<!--
ACTION ATTRIBUTES:
@@ -64,270 +62,276 @@
when referring to both H??F and X??F formats.
-->
- <section id="previous_releases">
- <title>Previous releases</title>
- <p>The change log for <a href="site:changes3x">POI 3.x</a> and <a
href="site:changespre3x">older releases</a>
- can be found in the history section.</p>
- </section>
-
- <!-- release version="4.1.3" date="2020-05-??">
- </release -->
+ <section id="previous_releases">
+ <title>Previous releases</title>
+ <p>The change log for <a href="site:changes3x">POI 3.x</a> and
+ <a href="site:changespre3x">older releases</a>
+ can be found in the history section.
+ </p>
+ </section>
+
+ <release version="4.1.3" date="2020-05-??">
+ <actions>
+ <action type="fix" fixes-bug="64186" context="OPC">Decrease usage
of ThreadLocals in XML Signature API</action>
+ </actions>
+ </release>
<release version="4.1.2" date="2020-02-17">
- <summary>
- <summary-item>Removed a lot of internal uses of
StringBuffers</summary-item>
- <summary-item>XDDF - some work on better chart support</summary-item>
- <summary-item>Common SL / EMF - ongoing rendering fixes</summary-item>
- <summary-item>XSLF - OOM fixes when parsing arbitrary shape ids + a
new dependency to SparseBitSet 1.2</summary-item>
- </summary>
- <actions>
- <action type="fix" fixes-bug="64015" context="POI_Overall">Swap
zaxxer.com:SparseBitSet for java.util.BitSet</action>
- <action type="fix" fixes-bug="63788" context="XWPF">When removing
AbstractNum match by abstractNumId, not list index</action>
- <action type="fix" fixes-bug="63940" context="POI_Overall">Avoid
endless loop/out of memory on string-replace with empty search string</action>
- <action type="fix" fixes-bug="63700" context="POI_Overall">Make D*
functions work with numeric result column</action>
- <action type="fix" fixes-bug="63960" context="SXSSF">Write
pre-evaluated string-values in formula cells with the correct type</action>
- <action type="fix" fixes-bug="63984" context="POI_Overall">Function
AND / OR should treat missing parameters as FALSE</action>
- <action type="fix" fixes-bug="63749" context="POI_Overall">Make
getFirstRowNum() and getFirstCellNum() return -1 consistently with empty
data</action>
- <action type="fix" fixes-bug="63569" context="POI_Overall">Make
IOUtils.setByteArrayMaxOverride() work correctly</action>
- <action type="add" context="XSLF">Add, insert and remove columns on
XSLFTable</action>
- <action type="fix" fixes-bug="63842" context="POI_Overall">Fix issue
with fractions where the whole number part is too large to store as an
int</action>
- <action type="fix" fixes-bug="63889" context="XDDF">Produce valid PPTX
file with several chart series</action>
- <action type="fix" fixes-bug="63918" context="SL_Common XSLF">Fix
texture fill - scale stretched images correctly</action>
- <action type="add" context="XDDF">Add Doughnut chart data series
support</action>
- <action type="fix" fixes-bug="63955"
context="HMEF">HMEFContentsExtractor fails to extract content from
winmail.dat</action>
- <action type="fix" fixes-bug="63927"
context="POI_Overall">Inconsistent mapping of Norwegian locales for date
formats</action>
- <action type="fix" fixes-bug="github-163" context="XSSF">Add set level
numbering on XWPFParagraph</action>
- <action type="fix" fixes-bug="github-164" context="XSSF">Fix Bug in
XSSFTable.setCellReferences when table is single cell</action>
- <action type="fix" fixes-bug="64004" context="POI_Overall">Replace
Cloneable / clone() with copy constructor</action>
- <action type="fix" fixes-bug="64036" context="POI_Overall">Replace
reflection calls in factories for Java 9+</action>
- <action type="fix" fixes-bug="64044" context="POI_Overall">Fix issue
with setCellValue(LocalDate) not supporting nulls properly</action>
- <action type="fix" fixes-bug="64088" context="SL_Common
XSLF">SlideShow rendering fixes</action>
- <action type="fix" fixes-bug="64098" context="XWPF">XWPFRun:
Whitespace in text not preserved if starting with tab character.</action>
- <action type="fix" fixes-bug="64108" context="POI_Overall">unsafe pipe
character ("|") in Relationship target attribute is not being encoded into a
'%7C'.</action>
- <action type="fix" fixes-bug="github-166" context="XDDF">Expose invert
if negative on bar charts</action>
- <action type="fix" fixes-bug="63998" context="HSSF">Support commas,
exclamation marks correctly in AreaReference</action>
- <action type="fix" fixes-bug="64045" context="XSSF">XSSFWorkbook
constructor doesn't close ZipFile if an exception occurs</action>
- <action type="fix" fixes-bug="64130" context="HSSF">Regression in
OldSheetRecord</action>
- </actions>
+ <summary>
+ <summary-item>Removed a lot of internal uses of
StringBuffers</summary-item>
+ <summary-item>XDDF - some work on better chart
support</summary-item>
+ <summary-item>Common SL / EMF - ongoing rendering
fixes</summary-item>
+ <summary-item>XSLF - OOM fixes when parsing arbitrary shape ids +
a new dependency to SparseBitSet 1.2</summary-item>
+ </summary>
+ <actions>
+ <action type="fix" fixes-bug="64015" context="POI_Overall">Swap
zaxxer.com:SparseBitSet for java.util.BitSet</action>
+ <action type="fix" fixes-bug="63788" context="XWPF">When removing
AbstractNum match by abstractNumId, not list index</action>
+ <action type="fix" fixes-bug="63940" context="POI_Overall">Avoid
endless loop/out of memory on string-replace with empty search string</action>
+ <action type="fix" fixes-bug="63700" context="POI_Overall">Make D*
functions work with numeric result column</action>
+ <action type="fix" fixes-bug="63960" context="SXSSF">Write
pre-evaluated string-values in formula cells with the correct type</action>
+ <action type="fix" fixes-bug="63984"
context="POI_Overall">Function AND / OR should treat missing parameters as
FALSE</action>
+ <action type="fix" fixes-bug="63749" context="POI_Overall">Make
getFirstRowNum() and getFirstCellNum() return -1 consistently with empty
data</action>
+ <action type="fix" fixes-bug="63569" context="POI_Overall">Make
IOUtils.setByteArrayMaxOverride() work correctly</action>
+ <action type="add" context="XSLF">Add, insert and remove columns
on XSLFTable</action>
+ <action type="fix" fixes-bug="63842" context="POI_Overall">Fix
issue with fractions where the whole number part is too large to store as an
int</action>
+ <action type="fix" fixes-bug="63889" context="XDDF">Produce valid
PPTX file with several chart series</action>
+ <action type="fix" fixes-bug="63918" context="SL_Common XSLF">Fix
texture fill - scale stretched images correctly</action>
+ <action type="add" context="XDDF">Add Doughnut chart data series
support</action>
+ <action type="fix" fixes-bug="63955"
context="HMEF">HMEFContentsExtractor fails to extract content from
winmail.dat</action>
+ <action type="fix" fixes-bug="63927"
context="POI_Overall">Inconsistent mapping of Norwegian locales for date
formats</action>
+ <action type="fix" fixes-bug="github-163" context="XSSF">Add set
level numbering on XWPFParagraph</action>
+ <action type="fix" fixes-bug="github-164" context="XSSF">Fix Bug
in XSSFTable.setCellReferences when table is single cell</action>
+ <action type="fix" fixes-bug="64004" context="POI_Overall">Replace
Cloneable / clone() with copy constructor</action>
+ <action type="fix" fixes-bug="64036" context="POI_Overall">Replace
reflection calls in factories for Java 9+</action>
+ <action type="fix" fixes-bug="64044" context="POI_Overall">Fix
issue with setCellValue(LocalDate) not supporting nulls properly</action>
+ <action type="fix" fixes-bug="64088" context="SL_Common
XSLF">SlideShow rendering fixes</action>
+ <action type="fix" fixes-bug="64098" context="XWPF">XWPFRun:
Whitespace in text not preserved if starting with tab character.</action>
+ <action type="fix" fixes-bug="64108" context="POI_Overall">unsafe
pipe character ("|") in Relationship target attribute is not being encoded into
a '%7C'.</action>
+ <action type="fix" fixes-bug="github-166" context="XDDF">Expose
invert if negative on bar charts</action>
+ <action type="fix" fixes-bug="63998" context="HSSF">Support
commas, exclamation marks correctly in AreaReference</action>
+ <action type="fix" fixes-bug="64045" context="XSSF">XSSFWorkbook
constructor doesn't close ZipFile if an exception occurs</action>
+ <action type="fix" fixes-bug="64130" context="HSSF">Regression in
OldSheetRecord</action>
+ </actions>
</release>
<release version="4.1.1" date="2019-10-20">
- <summary>
- <summary-item>XSSF: Memory improvements which use much less memory
while writing large xlsx files</summary-item>
- <summary-item>XDDF: Improved chart support: more types and some API
changes around angles and width units</summary-item>
- <summary-item>updated dependencies to Bouncycastle 1.62, Commons-Codec
1.13, Commons-Collections4 4.4, Commons-Compress 1.19</summary-item>
- <summary-item>XWPF: Additional API methods</summary-item>
- <summary-item>XSSF: Fixes to XSSFSheet.addMergedRegion() and
XSSFRow.shiftRows()</summary-item>
- <summary-item>EMF/HSLF: Rendering fixes</summary-item>
- <summary-item>CVE-2019-12415 - XML External Entity (XXE) Processing in
Apache POI</summary-item>
- </summary>
- <actions>
- <action type="add" fixes-bug="63774" context="POI_Overall">Cache pids
to speed up custom properties "add" method</action>
- <action type="add" fixes-bug="63779" context="SS_Common">Add support
for the new Java date/time API added in Java 8</action>
- <action type="fix" fixes-bug="59322" context="HWPF">Avoid
NullPointerException when reading Word Document with tables and a cell with a
null descriptor</action>
- <action type="fix" fixes-bug="61490" context="HWPF">Read cells of
tables correctly in cases where the last cell is not 'fake'</action>
- <action type="fix" context="HWPF">Do not use WeakReference for parents
in Ranges to avoid spurious failures in tests</action>
- <action type="fix" fixes-bug="63657" context="XSSF">Fix regression
with memory usage in XSSFRow.onDocumentWrite and some other temporary memory
leaks</action>
- <action type="fix" fixes-bug="63842"
context="SS_Common">FractionFormat casts whole part of the value into
'int'</action>
- <action type="fix" fixes-bug="63818" context="HSLF">Allow multiple
charsets for same font typeface</action>
- <action type="fix" fixes-bug="63768" context="XSSF">XSSFExportToXml
adjust settings on SchemaFactory</action>
- <action type="fix" fixes-bug="63541"
context="XSLF">NullPointerException from XSLFSimpleShape.getAnchor for empty
xfrm tags</action>
- <action type="add" fixes-bug="63745" context="POI_Overall">Add
traversing and debugging interface</action>
- <action type="fix" fixes-bug="57423,62711" context="XSSF">Fix
regression when XSSFRow.shiftRows() is used</action>
- <action type="fix" fixes-bug="63580" context="SL_Common HSLF XSLF">Fix
texture paint handling</action>
- <action type="fix" fixes-bug="59004" context="HSLF">HSLF rendering -
adjust values for presetShapeDefinition differs in HSLF/XSLF</action>
- <action type="fix" context="HSLF">Don't fallback to master shape
properties, if master shape is not assigned</action>
- <action type="add" context="POI_Overall">Add a
ThreadLocalUtil.clearAllThreadLocals which can be used to clear
thread-locals</action>
- <action type="fix" fixes-bug="63371"
context="XSSF">XSSFSheet.addMergedRegion should adjust count of merged
cells</action>
- <action type="fix" fixes-bug="63073" context="XSSF">Return value of
XSSFSheet.addMergedRegion is off by one</action>
- <action type="fix" fixes-bug="54803" context="OPC">Error opening XLSX
after saving with a Drawing using POI</action>
- <action type="add" fixes-bug="github-135" context="XDDF">Support to
create new chart without reading template</action>
- <action type="add" fixes-bug="github-143"
context="HPSF">MAPIType.isFixedLength: not true in case of length > 8</action>
- <action type="add" fixes-bug="github-144" context="XDDF">Support for
seven new chart types</action>
- <action type="add" fixes-bug="github-149" context="HSMF">improve
MAPIMessage.getHtmlBody</action>
- <action type="add" fixes-bug="github-150" context="XWPF">Add
XWPFPicture getWidth and getDepth methods</action>
- <action type="add" fixes-bug="github-151" context="XWPF">Add XWPFRun
getStyle method</action>
- <action type="add" fixes-bug="github-152" context="XWPF">Add
XWPFParagraph setKeepNext method</action>
- <action type="add" fixes-bug="github-153" context="XWPF">Add
XWPFParagraph createHyperlinkRun method</action>
- <action type="add" fixes-bug="github-154" context="SXSSF">Improved
support for writing large files</action>
- <action type="add" fixes-bug="github-157" context="OOXML">Add setters
to POIXMLProperties</action>
- <action type="fix" fixes-bug="63153" context="XDDF">Enable safe
removal of data series from charts</action>
- <action type="fix" fixes-bug="59623" context="XDDF">Provide example of
threshold line in bar chart</action>
- </actions>
+ <summary>
+ <summary-item>XSSF: Memory improvements which use much less memory
while writing large xlsx files</summary-item>
+ <summary-item>XDDF: Improved chart support: more types and some
API changes around angles and width units</summary-item>
+ <summary-item>updated dependencies to Bouncycastle 1.62,
Commons-Codec 1.13, Commons-Collections4 4.4, Commons-Compress
1.19</summary-item>
+ <summary-item>XWPF: Additional API methods</summary-item>
+ <summary-item>XSSF: Fixes to XSSFSheet.addMergedRegion() and
XSSFRow.shiftRows()</summary-item>
+ <summary-item>EMF/HSLF: Rendering fixes</summary-item>
+ <summary-item>CVE-2019-12415 - XML External Entity (XXE)
Processing in Apache POI</summary-item>
+ </summary>
+ <actions>
+ <action type="add" fixes-bug="63774" context="POI_Overall">Cache
pids to speed up custom properties "add" method</action>
+ <action type="add" fixes-bug="63779" context="SS_Common">Add
support for the new Java date/time API added in Java 8</action>
+ <action type="fix" fixes-bug="59322" context="HWPF">Avoid
NullPointerException when reading Word Document with tables and a cell with a
null descriptor</action>
+ <action type="fix" fixes-bug="61490" context="HWPF">Read cells of
tables correctly in cases where the last cell is not 'fake'</action>
+ <action type="fix" context="HWPF">Do not use WeakReference for
parents in Ranges to avoid spurious failures in tests</action>
+ <action type="fix" fixes-bug="63657" context="XSSF">Fix regression
with memory usage in XSSFRow.onDocumentWrite and some other temporary memory
leaks</action>
+ <action type="fix" fixes-bug="63842"
context="SS_Common">FractionFormat casts whole part of the value into
'int'</action>
+ <action type="fix" fixes-bug="63818" context="HSLF">Allow multiple
charsets for same font typeface</action>
+ <action type="fix" fixes-bug="63768"
context="XSSF">XSSFExportToXml adjust settings on SchemaFactory</action>
+ <action type="fix" fixes-bug="63541"
context="XSLF">NullPointerException from XSLFSimpleShape.getAnchor for empty
xfrm tags</action>
+ <action type="add" fixes-bug="63745" context="POI_Overall">Add
traversing and debugging interface</action>
+ <action type="fix" fixes-bug="57423,62711" context="XSSF">Fix
regression when XSSFRow.shiftRows() is used</action>
+ <action type="fix" fixes-bug="63580" context="SL_Common HSLF
XSLF">Fix texture paint handling</action>
+ <action type="fix" fixes-bug="59004" context="HSLF">HSLF rendering
- adjust values for presetShapeDefinition differs in HSLF/XSLF</action>
+ <action type="fix" context="HSLF">Don't fallback to master shape
properties, if master shape is not assigned</action>
+ <action type="add" context="POI_Overall">Add a
ThreadLocalUtil.clearAllThreadLocals which can be used to clear
thread-locals</action>
+ <action type="fix" fixes-bug="63371"
context="XSSF">XSSFSheet.addMergedRegion should adjust count of merged
cells</action>
+ <action type="fix" fixes-bug="63073" context="XSSF">Return value
of XSSFSheet.addMergedRegion is off by one</action>
+ <action type="fix" fixes-bug="54803" context="OPC">Error opening
XLSX after saving with a Drawing using POI</action>
+ <action type="add" fixes-bug="github-135" context="XDDF">Support
to create new chart without reading template</action>
+ <action type="add" fixes-bug="github-143"
context="HPSF">MAPIType.isFixedLength: not true in case of length > 8</action>
+ <action type="add" fixes-bug="github-144" context="XDDF">Support
for seven new chart types</action>
+ <action type="add" fixes-bug="github-149" context="HSMF">improve
MAPIMessage.getHtmlBody</action>
+ <action type="add" fixes-bug="github-150" context="XWPF">Add
XWPFPicture getWidth and getDepth methods</action>
+ <action type="add" fixes-bug="github-151" context="XWPF">Add
XWPFRun getStyle method</action>
+ <action type="add" fixes-bug="github-152" context="XWPF">Add
XWPFParagraph setKeepNext method</action>
+ <action type="add" fixes-bug="github-153" context="XWPF">Add
XWPFParagraph createHyperlinkRun method</action>
+ <action type="add" fixes-bug="github-154" context="SXSSF">Improved
support for writing large files</action>
+ <action type="add" fixes-bug="github-157" context="OOXML">Add
setters to POIXMLProperties</action>
+ <action type="fix" fixes-bug="63153" context="XDDF">Enable safe
removal of data series from charts</action>
+ <action type="fix" fixes-bug="59623" context="XDDF">Provide
example of threshold line in bar chart</action>
+ </actions>
</release>
<release version="4.1.0" date="2019-04-09">
- <summary>
- <summary-item>Improved support/fixes for Java 9+ and IBM
JVM</summary-item>
- <summary-item>New EMF renderer and support of SVG images in
XSLF</summary-item>
- <summary-item>Security, stability and memory/resource handling
improvements</summary-item>
- <summary-item>Various bug fixes across function and conditional format
rule evaluation</summary-item>
- <summary-item>Upgrade to XMLBeans 3.1.0</summary-item>
- <summary-item>Upgrade to Bouncycastle 1.61</summary-item>
- <summary-item>Upgrade to Curvesapi 1.06</summary-item>
- <summary-item>Upgrade to Commons-Codec 1.12</summary-item>
- <summary-item>Upgrade to Commons-Collections4 4.3</summary-item>
- <summary-item>Upgrade to XMLSec 2.1.2</summary-item>
- </summary>
- <actions>
- <action type="fix" fixes-bug="63200" context="XSLF">Avoid a possible
NullPointerException in XSLFShape.selectPaint()</action>
- <action type="add" fixes-bug="60724" context="SS_Common">Implement
'ignore hidden rows' variations for existing implemented variants</action>
- <action type="fix" fixes-bug="63264" context="SS_Common">Conditional
Format rule evaluation calculates relative references incorrectly</action>
- <action type="fix" fixes-bug="61652" context="SS_Common">Fix NPE in
EDATE function when date evaluates to an invalid value</action>
- <action type="fix" fixes-bug="62151" context="POIFS">Work around
illegal reflective access in Java 9+ when freeing buffers</action>
- <action type="add" fixes-bug="63029" context="OPC">OPCPackage
Potentially clobbers files on close()</action>
- <action type="add" fixes-bug="62980" context="SS_Common XSSF
HSSF">Make D* functions ignore case in headings </action>
- <action type="fix" fixes-bug="60977" context="XSSF">Adding custom
properties creates invalid .xlsx file on second write</action>
- <action type="fix" fixes-bug="60460" context="SL_Common">Null pointer
exception in ExternSheetNameResolver.prependSheetName method</action>
- <action type="fix" fixes-bug="60845" context="XSSF">Fix copying
styles/conditional formatting</action>
- <action type="add" fixes-bug="63054" context="SS_Common XSSF
HSSF">Improved evaluation of array formulas with errors in arguments</action>
- <action type="fix" fixes-bug="63047" context="POI_Overall">Make
POILogger subclassable</action>
- <action type="add" fixes-bug="62904" context="SS_Common XSSF
HSSF">Support array arguments in IF and logical IS*** functions</action>
- <action type="add" fixes-bug="63028" context="SL_Common XSLF
HSLF">Provide font embedding for slideshows</action>
- <action type="fix" fixes-bug="61532" context="SXSSF">Fix setting
values/types during formula evaluation for SXSSF</action>
- <action type="fix" fixes-bug="62629" context="OPC">Allow to handle
files with invalid content types for pictures</action>
- <action type="fix" fixes-bug="62839" context="SL_Common">Fix
MathX.floor for negative n</action>
- <action type="fix" fixes-bug="62884" context="SL_Common">Sheetnum is
not checked in InternalWorkbook.setSheetHidden()</action>
- <action type="fix" fixes-bug="62886" context="OPC">Regression
extracting text from corrupted docx files</action>
- <action type="add" fixes-bug="63017" context="SL_Common XSLF">Remove
rows from a XSLFTable</action>
- <action type="add" fixes-bug="60656" context="SL_Common XSLF HSLF">EMF
image support in slideshows</action>
- <action type="add" fixes-bug="62365" context="XSLF">SVG image support
in XSLF</action>
- <action type="add" fixes-bug="github-136" context="XSSF">Support
GEOMEAN function</action>
- <action type="fix" fixes-bug="63011" context="OPC">Multiple digital
signature in excel file broke first signature</action>
- <action type="fix" fixes-bug="62999" context="SL_Common">IBM JDK JIT
causes AIOOBE in TexturePaintContext</action>
- <action type="fix" fixes-bug="62994" context="POI_Overall">IBM JCE
workarounds</action>
- <action type="fix" fixes-bug="62966" context="SL_Common">init
presetShapeDefinitions.xml fail under IBM jdk</action>
- <action type="fix" fixes-bug="62953" context="SL_Common XSLF
HSLF">Rendering of FreeformShapes with formula fails</action>
- <action type="fix" fixes-bug="63005" context="POI_Overall">Remove
support for reading files that have XML entity definitions</action>
- <action type="fix" fixes-bug="63013" context="XWPF">add XWPFRun
setLang method</action>
- <action type="fix" fixes-bug="63240" context="XSSF">Remove unnecessary
synchronization on DocumentHelper.newDocumentBuilder and
SAXHelper.newXMLReader</action>
- <action type="fix" fixes-bug="61652" context="SS_Common">Fix NPE in
EDATE function when date evaluates to an invalid value</action>
- <action type="fix" fixes-bug="63264" context="SS_Common">Conditional
Format rule evaluation calculates relative references incorrectly</action>
- <action type="add" fixes-bug="60724" context="SS_Common">Implement
'ignore hidden rows' variations for existing SUBTOTAL function variants</action>
- <action type="fix" fixes-bug="63268" context="SS_Common">Fix issue
with CellUtil.setFont adding unnecessary styles</action>
- <action type="fix" fixes-bug="61700"
context="SS_Common">getForceFormulaRecalculation() returns wrong value</action>
- <action type="fix" fixes-bug="63292"
context="SS_Common">DataFormatter.formatCellValue() ignores use1904Windowing
w/4-part date formats</action>
- </actions>
+ <summary>
+ <summary-item>Improved support/fixes for Java 9+ and IBM
JVM</summary-item>
+ <summary-item>New EMF renderer and support of SVG images in
XSLF</summary-item>
+ <summary-item>Security, stability and memory/resource handling
improvements</summary-item>
+ <summary-item>Various bug fixes across function and conditional
format rule evaluation</summary-item>
+ <summary-item>Upgrade to XMLBeans 3.1.0</summary-item>
+ <summary-item>Upgrade to Bouncycastle 1.61</summary-item>
+ <summary-item>Upgrade to Curvesapi 1.06</summary-item>
+ <summary-item>Upgrade to Commons-Codec 1.12</summary-item>
+ <summary-item>Upgrade to Commons-Collections4 4.3</summary-item>
+ <summary-item>Upgrade to XMLSec 2.1.2</summary-item>
+ </summary>
+ <actions>
+ <action type="fix" fixes-bug="63200" context="XSLF">Avoid a
possible NullPointerException in XSLFShape.selectPaint()</action>
+ <action type="add" fixes-bug="60724" context="SS_Common">Implement
'ignore hidden rows' variations for existing implemented variants</action>
+ <action type="fix" fixes-bug="63264"
context="SS_Common">Conditional Format rule evaluation calculates relative
references incorrectly</action>
+ <action type="fix" fixes-bug="61652" context="SS_Common">Fix NPE
in EDATE function when date evaluates to an invalid value</action>
+ <action type="fix" fixes-bug="62151" context="POIFS">Work around
illegal reflective access in Java 9+ when freeing buffers</action>
+ <action type="add" fixes-bug="63029" context="OPC">OPCPackage
Potentially clobbers files on close()</action>
+ <action type="add" fixes-bug="62980" context="SS_Common XSSF
HSSF">Make D* functions ignore case in headings</action>
+ <action type="fix" fixes-bug="60977" context="XSSF">Adding custom
properties creates invalid .xlsx file on second write</action>
+ <action type="fix" fixes-bug="60460" context="SL_Common">Null
pointer exception in ExternSheetNameResolver.prependSheetName method</action>
+ <action type="fix" fixes-bug="60845" context="XSSF">Fix copying
styles/conditional formatting</action>
+ <action type="add" fixes-bug="63054" context="SS_Common XSSF
HSSF">Improved evaluation of array formulas with errors in arguments</action>
+ <action type="fix" fixes-bug="63047" context="POI_Overall">Make
POILogger subclassable</action>
+ <action type="add" fixes-bug="62904" context="SS_Common XSSF
HSSF">Support array arguments in IF and logical IS*** functions</action>
+ <action type="add" fixes-bug="63028" context="SL_Common XSLF
HSLF">Provide font embedding for slideshows</action>
+ <action type="fix" fixes-bug="61532" context="SXSSF">Fix setting
values/types during formula evaluation for SXSSF</action>
+ <action type="fix" fixes-bug="62629" context="OPC">Allow to handle
files with invalid content types for pictures</action>
+ <action type="fix" fixes-bug="62839" context="SL_Common">Fix
MathX.floor for negative n</action>
+ <action type="fix" fixes-bug="62884" context="SL_Common">Sheetnum
is not checked in InternalWorkbook.setSheetHidden()</action>
+ <action type="fix" fixes-bug="62886" context="OPC">Regression
extracting text from corrupted docx files</action>
+ <action type="add" fixes-bug="63017" context="SL_Common
XSLF">Remove rows from a XSLFTable</action>
+ <action type="add" fixes-bug="60656" context="SL_Common XSLF
HSLF">EMF image support in slideshows</action>
+ <action type="add" fixes-bug="62365" context="XSLF">SVG image
support in XSLF</action>
+ <action type="add" fixes-bug="github-136" context="XSSF">Support
GEOMEAN function</action>
+ <action type="fix" fixes-bug="63011" context="OPC">Multiple
digital signature in excel file broke first signature</action>
+ <action type="fix" fixes-bug="62999" context="SL_Common">IBM JDK
JIT causes AIOOBE in TexturePaintContext</action>
+ <action type="fix" fixes-bug="62994" context="POI_Overall">IBM JCE
workarounds</action>
+ <action type="fix" fixes-bug="62966" context="SL_Common">init
presetShapeDefinitions.xml fail under IBM jdk</action>
+ <action type="fix" fixes-bug="62953" context="SL_Common XSLF
HSLF">Rendering of FreeformShapes with formula fails</action>
+ <action type="fix" fixes-bug="63005" context="POI_Overall">Remove
support for reading files that have XML entity definitions</action>
+ <action type="fix" fixes-bug="63013" context="XWPF">add XWPFRun
setLang method</action>
+ <action type="fix" fixes-bug="63240" context="XSSF">Remove
unnecessary synchronization on DocumentHelper.newDocumentBuilder and
SAXHelper.newXMLReader</action>
+ <action type="fix" fixes-bug="61652" context="SS_Common">Fix NPE
in EDATE function when date evaluates to an invalid value</action>
+ <action type="fix" fixes-bug="63264"
context="SS_Common">Conditional Format rule evaluation calculates relative
references incorrectly</action>
+ <action type="add" fixes-bug="60724" context="SS_Common">Implement
'ignore hidden rows' variations for existing SUBTOTAL function variants</action>
+ <action type="fix" fixes-bug="63268" context="SS_Common">Fix issue
with CellUtil.setFont adding unnecessary styles</action>
+ <action type="fix" fixes-bug="61700"
context="SS_Common">getForceFormulaRecalculation() returns wrong value</action>
+ <action type="fix" fixes-bug="63292"
context="SS_Common">DataFormatter.formatCellValue() ignores use1904Windowing
w/4-part date formats</action>
+ </actions>
</release>
<release version="4.0.1" date="2018-12-03">
- <summary>
- <summary-item>Fixes pom.xml entries for commons-maths3 (missing),
curvesapi and commons-codec</summary-item>
- <summary-item>Improvements for XDDF charts and text
manipulation</summary-item>
- <summary-item>Upgrade to XMLBeans 3.0.2</summary-item>
- </summary>
- <actions>
- <action type="fix" fixes-bug="59773" context="POI_Overall">Move loop
invariants outside of loop for faster execution</action>
- <action type="fix" fixes-bug="59834" context="POI_Overall">poi-ooxml
pom.xml should include dependency on poi-scratchpad</action>
- <action type="fix" fixes-bug="62690" context="POI_Overall">Missing
Maven dependency to commons-math3</action>
- <action type="fix" fixes-bug="62692" context="OPC">WildFly XML parser
not properly supported - Property
'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not
recognized </action>
- <action type="fix" fixes-bug="62699" context="POI_Overall">Download
page must link to https://www.apache.org/dist/poi/KEYS</action>
- <action type="fix" fixes-bug="62733" context="XSLF">XSLFBackground
setFill() can corrupt the document</action>
- <action type="fix" fixes-bug="62735" context="XSSF">poi-ooxml 4.0.0
should have dependency on curvesapi 1.05</action>
- <action type="fix" fixes-bug="62740" context="XSSF">XSSFTable
constructor automatically assigns invalid (non-unique) column IDs</action>
- <action type="fix" fixes-bug="62768" context="OPC">OPCPackage#close()
method is incorrectly synchronized</action>
- <action type="fix" fixes-bug="62796" context="POI_Overall">Remove XML
Event parser code from PackagePropertiesMarshaller</action>
- <action type="fix" fixes-bug="62800" context="XSLF">Fix null pointer
exception if a picture shape has no blip id</action>
- <action type="fix" fixes-bug="62805" context="POI_Overall">Fix
Old-Xerces build issues</action>
- <action type="fix" fixes-bug="62805"
context="XSLF">XSLFTableCell#removeBorder(BorderEdge.right) removes the bottom
edge not the right edge.</action>
- <action type="fix" fixes-bug="62811" context="POI_Overall">POI
Encryption didn't work with 4.0.0 but did work with 3.17 </action>
- <action type="fix" fixes-bug="62951" context="POI_Overall">FileMagic
not correctly identified</action>
- <action type="fix" fixes-bug="62949" context="SL_Common">SlideShow
rendering - keyframe fractions must be increasing</action>
- <action type="fix" fixes-bug="62921" context="POI_Overall">Provide
OOXMLLite alternative for Java 12+</action>
- <action type="fix" fixes-bug="62625" context="POI_Overall">Handle
off-spec, variant REFERENCE_NAME record structure in VBAMacroReader</action>
- <action type="fix" fixes-bug="62624" context="POI_Overall">Handle
module name mapping in VBAMacroReader</action>
- <action type="fix" fixes-bug="62836" context="SS_Common">Support TREND
function</action>
- <action type="fix" fixes-bug="62859" context="XWPF">Rare NPE while
creating XWPFSDTContent</action>
- <action type="add" fixes-bug="62373" context="SS_Common">Support for
FREQUENCY function</action>
- <action type="fix" fixes-bug="62831"
context="POI_Overall">WorkbookFactory.create support for subclass of File, eg
from JFileChooser</action>
- <action type="fix" fixes-bug="62815" context="XSSF">XLSB number
extraction improvements</action>
- <action type="fix" fixes-bug="62373" context="SS_Common">Support
FREQUENCY function</action>
- <action type="fix" fixes-bug="62742" context="POI_Overall">Add
common-compress jar to bin zip/tgz</action>
- <action type="fix" fixes-bug="62747" context="POI_Overall">Upgrade
bouncycastle dependency to 1.60</action>
- <action type="fix" fixes-bug="62736" context="XWPF">Relations on
XSLFPictureShape were removed unconditionally</action>
- <action type="add" fixes-bug="github-109" context="XDDF">Define XDDF
user model for text body, its paragraphs and text runs</action>
- <action type="add" fixes-bug="github-123" context="XSSF">Import chart
on drawing</action>
- <action type="fix" fixes-bug="62746" context="XDDF">Support axIds in
XDDF</action>
- <action type="fix" fixes-bug="60509"
context="XSSF">XSSFWorkbook.setSheetName() does not update references in
charts</action>
- <action type="fix" fixes-bug="59625" context="XWPF">Localisation
(Internationalisation in other languages) when applied in charts corrupt the MS
Word file</action>
- </actions>
+ <summary>
+ <summary-item>Fixes pom.xml entries for commons-maths3 (missing),
curvesapi and commons-codec</summary-item>
+ <summary-item>Improvements for XDDF charts and text
manipulation</summary-item>
+ <summary-item>Upgrade to XMLBeans 3.0.2</summary-item>
+ </summary>
+ <actions>
+ <action type="fix" fixes-bug="59773" context="POI_Overall">Move
loop invariants outside of loop for faster execution</action>
+ <action type="fix" fixes-bug="59834"
context="POI_Overall">poi-ooxml pom.xml should include dependency on
poi-scratchpad</action>
+ <action type="fix" fixes-bug="62690" context="POI_Overall">Missing
Maven dependency to commons-math3</action>
+ <action type="fix" fixes-bug="62692" context="OPC">WildFly XML
parser not properly supported - Property
'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not
recognized</action>
+ <action type="fix" fixes-bug="62699"
context="POI_Overall">Download page must link to
https://www.apache.org/dist/poi/KEYS</action>
+ <action type="fix" fixes-bug="62733" context="XSLF">XSLFBackground
setFill() can corrupt the document</action>
+ <action type="fix" fixes-bug="62735" context="XSSF">poi-ooxml
4.0.0 should have dependency on curvesapi 1.05</action>
+ <action type="fix" fixes-bug="62740" context="XSSF">XSSFTable
constructor automatically assigns invalid (non-unique) column IDs</action>
+ <action type="fix" fixes-bug="62768"
context="OPC">OPCPackage#close() method is incorrectly synchronized</action>
+ <action type="fix" fixes-bug="62796" context="POI_Overall">Remove
XML Event parser code from PackagePropertiesMarshaller</action>
+ <action type="fix" fixes-bug="62800" context="XSLF">Fix null
pointer exception if a picture shape has no blip id</action>
+ <action type="fix" fixes-bug="62805" context="POI_Overall">Fix
Old-Xerces build issues</action>
+ <action type="fix" fixes-bug="62805"
context="XSLF">XSLFTableCell#removeBorder(BorderEdge.right) removes the bottom
edge not the right edge.</action>
+ <action type="fix" fixes-bug="62811" context="POI_Overall">POI
Encryption didn't work with 4.0.0 but did work with 3.17</action>
+ <action type="fix" fixes-bug="62951"
context="POI_Overall">FileMagic not correctly identified</action>
+ <action type="fix" fixes-bug="62949" context="SL_Common">SlideShow
rendering - keyframe fractions must be increasing</action>
+ <action type="fix" fixes-bug="62921" context="POI_Overall">Provide
OOXMLLite alternative for Java 12+</action>
+ <action type="fix" fixes-bug="62625" context="POI_Overall">Handle
off-spec, variant REFERENCE_NAME record structure in VBAMacroReader</action>
+ <action type="fix" fixes-bug="62624" context="POI_Overall">Handle
module name mapping in VBAMacroReader</action>
+ <action type="fix" fixes-bug="62836" context="SS_Common">Support
TREND function</action>
+ <action type="fix" fixes-bug="62859" context="XWPF">Rare NPE while
creating XWPFSDTContent</action>
+ <action type="add" fixes-bug="62373" context="SS_Common">Support
for FREQUENCY function</action>
+ <action type="fix" fixes-bug="62831"
context="POI_Overall">WorkbookFactory.create support for subclass of File, eg
from JFileChooser</action>
+ <action type="fix" fixes-bug="62815" context="XSSF">XLSB number
extraction improvements</action>
+ <action type="fix" fixes-bug="62373" context="SS_Common">Support
FREQUENCY function</action>
+ <action type="fix" fixes-bug="62742" context="POI_Overall">Add
common-compress jar to bin zip/tgz</action>
+ <action type="fix" fixes-bug="62747" context="POI_Overall">Upgrade
bouncycastle dependency to 1.60</action>
+ <action type="fix" fixes-bug="62736" context="XWPF">Relations on
XSLFPictureShape were removed unconditionally</action>
+ <action type="add" fixes-bug="github-109" context="XDDF">Define
XDDF user model for text body, its paragraphs and text runs</action>
+ <action type="add" fixes-bug="github-123" context="XSSF">Import
chart on drawing</action>
+ <action type="fix" fixes-bug="62746" context="XDDF">Support axIds
in XDDF</action>
+ <action type="fix" fixes-bug="60509"
context="XSSF">XSSFWorkbook.setSheetName() does not update references in
charts</action>
+ <action type="fix" fixes-bug="59625" context="XWPF">Localisation
(Internationalisation in other languages) when applied in charts corrupt the MS
Word file</action>
+ </actions>
</release>
+
<release version="4.0.0" date="2018-09-07">
- <summary>
- <summary-item>Removed support for Java 6 and 7 making Java 8 the
minimum version supported</summary-item>
- <summary-item>New OOXML schema (1.4) necessary, because of
incompatible XMLBeans loading not anymore through
POIXMLTypeLoader</summary-item>
- </summary>
- <actions>
- <action type="remove" fixes-bug="62649" breaks-compatibility="true"
context="POIFS">Remove OPOIFS*</action>
- <action type="fix" fixes-bug="61589" context="XSLF">Importing content
does not copy hyperlink address</action>
- <action type="fix" fixes-bug="62587" context="XSLF">repeated call to
XSLFSheet.removeShape leads to java.lang.IllegalArgumentException:
partName</action>
- <action type="fix" fixes-bug="62513" context="OOXML">Don't try to
parse embedded package relationships</action>
- <action type="add" fixes-bug="59268" context="OOXML">Work on providing
an updated version of XMLBeans</action>
- <action type="fix" fixes-bug="62451" context="HPSF">Document last
printed in the year 27321</action>
- <action type="fix" fixes-bug="60713" breaks-compatibility="true"
context="SXSSF XSSF OPC">(S)XSSFWorkbook/POIXMLDocument.write(OutputStream)
closes the OutputStream</action>
- <action type="add" fixes-bug="62452" context="OPC">Extract
configuration while verifying XML signatures</action>
- <action type="fix" fixes-bug="62187" breaks-compatibility="true"
context="OPC">Compiling with Java 10 fails with ClassCastException / use
commons-compress</action>
- <action type="fix" fixes-bug="62355" breaks-compatibility="true"
context="POI_Overall">Unsplit packages for Jigsaw / Java 9
compatibility</action>
- <action type="fix" fixes-bug="62041" context="SL_Common">TestFonts
fails on Mac</action>
- <action type="fix" fixes-bug="62051" context="XSLF">Two shapes have
the same shapeId within the same slide</action>
- <action type="fix" fixes-bug="61633" context="XSLF">Zero width shapes
aren't rendered</action>
- <action type="add" fixes-bug="62037" context="SL_Common">SlideNames
should not be null but have a default as if accessed by VBA</action>
- <action type="fix" fixes-bug="62381" context="SL_Common">Fix rendering
of AutoShapes</action>
- <action type="fix" fixes-bug="59893" context="POI_Overall">Forbid
calls to InputStream.available</action>
- <action type="fix" fixes-bug="61905"
context="HSSF">HSSFWorkbook.setActiveCell() does not actually make the cell
selected in Excel</action>
- <action type="fix" fixes-bug="61459"
context="HSLF">HSLFShape.getShapeName() returns name of shapeType and not the
shape name</action>
- <action type="add" fixes-bug="62319" breaks-compatibility="true"
context="SL_Common">Decommission XSLF-/PowerPointExtractor</action>
- <action type="add" fixes-bug="62092" context="SL_Common">Text not
extracted from grouped text shapes in HSLF</action>
- <action type="add" fixes-bug="62159" context="OPC">Support XML
signature over windows certificate store</action>
- <action type="add" fixes-bug="57369" context="XDDF">Add support for
major and minor units on chart axes</action>
- <action type="add" fixes-bug="55954" context="XWPF">Added methods to
position table</action>
- <action type="add" fixes-bug="61947" context="POI_Overall">Remove
deprecated classes (POI 4.0.0)</action>
- <action type="add" fixes-bug="55954" context="XWPF">Add functions to
get, set, remove outer borders for tables</action>
- <action type="add" fixes-bug="github-72" context="XDDF">Define XDDF
user model for shape properties to be shared between XSLF, XSSF and
XWPF</action>
- <action type="add" fixes-bug="61543" breaks-compatibility="true"
context="XSSF">Do not fail with "part already exists" when tables are
created/removed</action>
- <action type="add" fixes-bug="61550" breaks-compatibility="true"
context="POI_Overall">Add more information to exception text and verify that it
is thrown</action>
- <action type="add" fixes-bug="61609" breaks-compatibility="true"
context="POI_Overall">Add .gitattribute file and set lf for one
sample-file</action>
- <action type="add" fixes-bug="61797" breaks-compatibility="true"
context="SL_Common">Embed Excel / Ole objects into powerpoint</action>
- <action type="fix" fixes-bug="61943" context="SL_Common">narrow
generics definition because of tighter java9 checks</action>
- <action type="add" fixes-bug="61942" context="OPC">Refactor
PackagePartName handling and add getUnusedPartIndex method</action>
- <action type="fix" fixes-bug="61941" context="POIFS">Move Ole marker
generation to Ole10Native</action>
- <action type="fix" fixes-bug="61940" context="POI_Overall">Replace
ClassID statics with enum</action>
- <action type="add" fixes-bug="61939" context="OPC">Provide schema for
AlternateContent - provide new ooxml-schemas-1.4.jar</action>
- <action type="fix" fixes-bug="61787" context="HSSF">Change how deleted
content is detected to not incorrectly see too much text as deleted, this was
introduced with bug 58067</action>
- <action type="fix" fixes-bug="61798" context="HSSF">Fix usage of
getLastCellNum() when calculating worksheet dimension during saving</action>
- <action type="fix" fixes-bug="61911" context="HWPF">Avoid
IndexOutOfBounds access when reading pictures</action>
- <action type="fix" fixes-bug="61765" context="HSSF">Support third
party tool generated files using WorkBook as their POIFS directory name</action>
- <action type="fix" fixes-bug="61881" context="HSLF">Regression in ppt
parsing: typeface can't be null or empty</action>
- <action type="add" fixes-bug="github-68" context="XDDF XSLF XSSF
XWPF">Share chart data implementation between XSLFChart, XSSFChart and
XWPFChart through XDDF</action>
- <action type="fix" fixes-bug="61809" context="HPSF">Infinite loop in
SectionIDMap.get() and .put()</action>
- <action type="add" fixes-bug="60887" context="XSSF">Surface XSSF
Header/Footer Attributes</action>
- <action type="add" fixes-bug="61730"
context="SS_Common">CellRangeAddresses support iterating over their
CellAddresses</action>
- <action type="fix" fixes-bug="61727" context="SS_Common">CellRangeUtil
merge cell ranges broken for certain orders of arguments</action>
- <action type="fix" fixes-bug="57517" context="HSSF">Fix various
situations that were handled incorrectly in HSSFOptimiser</action>
- <action type="add" fixes-bug="61671" context="XSLF">XSLFSlide does not
contain isHidden and setHidden like HSLFSlide does</action>
- <action type="update" fixes-bug="61630" context="XSSF">Performance
improvement to XSSFExportToXML</action>
- <action type="add" fixes-bug="58068" context="XSSF">Add a method to
pass the actual Color to StylesTable.findFont()</action>
- <action type="fix" fixes-bug="61096" context="POIFS">Add support for
modules in VBAMacroReader</action>
- <action type="fix" fixes-bug="61033" context="XSSF">Add
XSSFWorkbook.setCellFormulaValidation() to control if formulas are validated
during Cell.setCellFormula()</action>
- <action type="fix" fixes-bug="61148" context="SXSSF">Fix
calculating/setting formula value</action>
- <action type="fix" fixes-bug="61064" context="SS_Common">Support
behavior of function CEILING in newer versions of Microsoft Excel</action>
- <action type="fix" fixes-bug="61516" context="SS_Common">Correctly
handle references that end up outside the workbook when cells with formulas are
copied</action>
- <action type="add" fixes-bug="60737" context="XSSF">Add endSheet() to
XSSFEventBasedExcelExtractor</action>
- <action type="fix" fixes-bug="59747" context="OPC">Exchange order of
writing parts into Zip to allow some tools to handle files better</action>
- <action type="add" fixes-bug="github-69" context="SS_Common">Support
matrix functions</action>
- <action type="fix" fixes-bug="60499" context="OPC">Deleting a picture
that is used twice on a slide corrupt the slide</action>
- <action type="fix" fixes-bug="60279" context="POI_Overall">Back-off to
brute-force search for macro content if macro offset is incorrect</action>
- <action type="add" fixes-bug="61528" context="XSSF">Pivot table
enhancements</action>
- <action type="fix" fixes-bug="61906" context="XSSF">add API for
working with RichStringText</action>
- <action type="fix" fixes-bug="61792" context="SS_Common">Avoid
iterating over chars (use codepoints instead)</action>
- <action type="fix" fixes-bug="62254" context="SS_Common">Update OFFSET
function to support optional values</action>
- <action type="update" fixes-bug="62435" context="XSSF">Rename
getAllEmbedds method to getAllEmbeddedParts (getAllEmbedds is retained but
deprecated)</action>
- <action type="update" fixes-bug="62438" breaks-compatibility="true"
context="POI_Overall">Replace org.apache.poi.openxml4j.util.Nullable with
java.lang.Optional</action>
- <action type="fix" fixes-bug="github-90" context="XSSF">Change default
DSIG signing algorithm to SHA256</action>
- <action type="fix" fixes-bug="github-107" context="SS_Common">Support
AREAS function</action>
- <action type="fix" fixes-bug="github-110" breaks-compatibility="true"
context="XWPF">Renames org.apache.poi.xwpf.usermodel.TextSegement to
org.apache.poi.xwpf.usermodel.TextSegment</action>
- <action type="fix" fixes-bug="github-114" context="XWPF">Better
support for Footnotes and Endnotes</action>
- </actions>
+ <summary>
+ <summary-item>Removed support for Java 6 and 7 making Java 8 the
minimum version supported</summary-item>
+ <summary-item>New OOXML schema (1.4) necessary, because of
incompatible XMLBeans loading not anymore through
POIXMLTypeLoader</summary-item>
+ </summary>
+ <actions>
+ <action type="remove" fixes-bug="62649"
breaks-compatibility="true" context="POIFS">Remove OPOIFS*</action>
+ <action type="fix" fixes-bug="61589" context="XSLF">Importing
content does not copy hyperlink address</action>
+ <action type="fix" fixes-bug="62587" context="XSLF">repeated call
to XSLFSheet.removeShape leads to java.lang.IllegalArgumentException:
partName</action>
+ <action type="fix" fixes-bug="62513" context="OOXML">Don't try to
parse embedded package relationships</action>
+ <action type="add" fixes-bug="59268" context="OOXML">Work on
providing an updated version of XMLBeans</action>
+ <action type="fix" fixes-bug="62451" context="HPSF">Document last
printed in the year 27321</action>
+ <action type="fix" fixes-bug="60713" breaks-compatibility="true"
context="SXSSF XSSF OPC">(S)XSSFWorkbook/POIXMLDocument.write(OutputStream)
closes the OutputStream</action>
+ <action type="add" fixes-bug="62452" context="OPC">Extract
configuration while verifying XML signatures</action>
+ <action type="fix" fixes-bug="62187" breaks-compatibility="true"
context="OPC">Compiling with Java 10 fails with ClassCastException / use
commons-compress</action>
+ <action type="fix" fixes-bug="62355" breaks-compatibility="true"
context="POI_Overall">Unsplit packages for Jigsaw / Java 9
compatibility</action>
+ <action type="fix" fixes-bug="62041" context="SL_Common">TestFonts
fails on Mac</action>
+ <action type="fix" fixes-bug="62051" context="XSLF">Two shapes
have the same shapeId within the same slide</action>
+ <action type="fix" fixes-bug="61633" context="XSLF">Zero width
shapes aren't rendered</action>
+ <action type="add" fixes-bug="62037"
context="SL_Common">SlideNames should not be null but have a default as if
accessed by VBA</action>
+ <action type="fix" fixes-bug="62381" context="SL_Common">Fix
rendering of AutoShapes</action>
+ <action type="fix" fixes-bug="59893" context="POI_Overall">Forbid
calls to InputStream.available</action>
+ <action type="fix" fixes-bug="61905"
context="HSSF">HSSFWorkbook.setActiveCell() does not actually make the cell
selected in Excel</action>
+ <action type="fix" fixes-bug="61459"
context="HSLF">HSLFShape.getShapeName() returns name of shapeType and not the
shape name</action>
+ <action type="add" fixes-bug="62319" breaks-compatibility="true"
context="SL_Common">Decommission XSLF-/PowerPointExtractor</action>
+ <action type="add" fixes-bug="62092" context="SL_Common">Text not
extracted from grouped text shapes in HSLF</action>
+ <action type="add" fixes-bug="62159" context="OPC">Support XML
signature over windows certificate store</action>
+ <action type="add" fixes-bug="57369" context="XDDF">Add support
for major and minor units on chart axes</action>
+ <action type="add" fixes-bug="55954" context="XWPF">Added methods
to position table</action>
+ <action type="add" fixes-bug="61947" context="POI_Overall">Remove
deprecated classes (POI 4.0.0)</action>
+ <action type="add" fixes-bug="55954" context="XWPF">Add functions
to get, set, remove outer borders for tables</action>
+ <action type="add" fixes-bug="github-72" context="XDDF">Define
XDDF user model for shape properties to be shared between XSLF, XSSF and
XWPF</action>
+ <action type="add" fixes-bug="61543" breaks-compatibility="true"
context="XSSF">Do not fail with "part already exists" when tables are
created/removed</action>
+ <action type="add" fixes-bug="61550" breaks-compatibility="true"
context="POI_Overall">Add more information to exception text and verify that it
is thrown</action>
+ <action type="add" fixes-bug="61609" breaks-compatibility="true"
context="POI_Overall">Add .gitattribute file and set lf for one
sample-file</action>
+ <action type="add" fixes-bug="61797" breaks-compatibility="true"
context="SL_Common">Embed Excel / Ole objects into powerpoint</action>
+ <action type="fix" fixes-bug="61943" context="SL_Common">narrow
generics definition because of tighter java9 checks</action>
+ <action type="add" fixes-bug="61942" context="OPC">Refactor
PackagePartName handling and add getUnusedPartIndex method</action>
+ <action type="fix" fixes-bug="61941" context="POIFS">Move Ole
marker generation to Ole10Native</action>
+ <action type="fix" fixes-bug="61940" context="POI_Overall">Replace
ClassID statics with enum</action>
+ <action type="add" fixes-bug="61939" context="OPC">Provide schema
for AlternateContent - provide new ooxml-schemas-1.4.jar</action>
+ <action type="fix" fixes-bug="61787" context="HSSF">Change how
deleted content is detected to not incorrectly see too much text as deleted,
this was introduced with bug 58067</action>
+ <action type="fix" fixes-bug="61798" context="HSSF">Fix usage of
getLastCellNum() when calculating worksheet dimension during saving</action>
+ <action type="fix" fixes-bug="61911" context="HWPF">Avoid
IndexOutOfBounds access when reading pictures</action>
+ <action type="fix" fixes-bug="61765" context="HSSF">Support third
party tool generated files using WorkBook as their POIFS directory name</action>
+ <action type="fix" fixes-bug="61881" context="HSLF">Regression in
ppt parsing: typeface can't be null or empty</action>
+ <action type="add" fixes-bug="github-68" context="XDDF XSLF XSSF
XWPF">Share chart data implementation between XSLFChart, XSSFChart and
XWPFChart through XDDF</action>
+ <action type="fix" fixes-bug="61809" context="HPSF">Infinite loop
in SectionIDMap.get() and .put()</action>
+ <action type="add" fixes-bug="60887" context="XSSF">Surface XSSF
Header/Footer Attributes</action>
+ <action type="add" fixes-bug="61730"
context="SS_Common">CellRangeAddresses support iterating over their
CellAddresses</action>
+ <action type="fix" fixes-bug="61727"
context="SS_Common">CellRangeUtil merge cell ranges broken for certain orders
of arguments</action>
+ <action type="fix" fixes-bug="57517" context="HSSF">Fix various
situations that were handled incorrectly in HSSFOptimiser</action>
+ <action type="add" fixes-bug="61671" context="XSLF">XSLFSlide does
not contain isHidden and setHidden like HSLFSlide does</action>
+ <action type="update" fixes-bug="61630" context="XSSF">Performance
improvement to XSSFExportToXML</action>
+ <action type="add" fixes-bug="58068" context="XSSF">Add a method
to pass the actual Color to StylesTable.findFont()</action>
+ <action type="fix" fixes-bug="61096" context="POIFS">Add support
for modules in VBAMacroReader</action>
+ <action type="fix" fixes-bug="61033" context="XSSF">Add
XSSFWorkbook.setCellFormulaValidation() to control if formulas are validated
during Cell.setCellFormula()</action>
+ <action type="fix" fixes-bug="61148" context="SXSSF">Fix
calculating/setting formula value</action>
+ <action type="fix" fixes-bug="61064" context="SS_Common">Support
behavior of function CEILING in newer versions of Microsoft Excel</action>
+ <action type="fix" fixes-bug="61516" context="SS_Common">Correctly
handle references that end up outside the workbook when cells with formulas are
copied</action>
+ <action type="add" fixes-bug="60737" context="XSSF">Add endSheet()
to XSSFEventBasedExcelExtractor</action>
+ <action type="fix" fixes-bug="59747" context="OPC">Exchange order
of writing parts into Zip to allow some tools to handle files better</action>
+ <action type="add" fixes-bug="github-69"
context="SS_Common">Support matrix functions</action>
+ <action type="fix" fixes-bug="60499" context="OPC">Deleting a
picture that is used twice on a slide corrupt the slide</action>
+ <action type="fix" fixes-bug="60279"
context="POI_Overall">Back-off to brute-force search for macro content if macro
offset is incorrect</action>
+ <action type="add" fixes-bug="61528" context="XSSF">Pivot table
enhancements</action>
+ <action type="fix" fixes-bug="61906" context="XSSF">add API for
working with RichStringText</action>
+ <action type="fix" fixes-bug="61792" context="SS_Common">Avoid
iterating over chars (use codepoints instead)</action>
+ <action type="fix" fixes-bug="62254" context="SS_Common">Update
OFFSET function to support optional values</action>
+ <action type="update" fixes-bug="62435" context="XSSF">Rename
getAllEmbedds method to getAllEmbeddedParts (getAllEmbedds is retained but
deprecated)</action>
+ <action type="update" fixes-bug="62438"
breaks-compatibility="true" context="POI_Overall">Replace
org.apache.poi.openxml4j.util.Nullable with java.lang.Optional</action>
+ <action type="fix" fixes-bug="github-90" context="XSSF">Change
default DSIG signing algorithm to SHA256</action>
+ <action type="fix" fixes-bug="github-107"
context="SS_Common">Support AREAS function</action>
+ <action type="fix" fixes-bug="github-110"
breaks-compatibility="true" context="XWPF">Renames
org.apache.poi.xwpf.usermodel.TextSegement to
org.apache.poi.xwpf.usermodel.TextSegment</action>
+ <action type="fix" fixes-bug="github-114" context="XWPF">Better
support for Footnotes and Endnotes</action>
+ </actions>
</release>
</changes>
Modified: poi/site/src/documentation/content/xdocs/encryption.xml
URL:
http://svn.apache.org/viewvc/poi/site/src/documentation/content/xdocs/encryption.xml?rev=1874671&r1=1874670&r2=1874671&view=diff
==============================================================================
--- poi/site/src/documentation/content/xdocs/encryption.xml (original)
+++ poi/site/src/documentation/content/xdocs/encryption.xml Sun Mar 1 22:20:38
2020
@@ -226,6 +226,10 @@ try (POIFSFileSystem fs = new POIFSFileS
</section>
<section><title>XML-based formats - Signing (XML Signature)</title>
+
+ <note>As of <a
href="https://bz.apache.org/bugzilla/show_bug.cgi?id=64186">#64186</a> the
configuration of the
+ OPCPackage has changed, the examples below have been adopted and reflect
the POI 4.1.3 API</note>
+
<p>An Office document can be digital signed by a <a
href="https://en.wikipedia.org/wiki/XML_Signature">XML Signature</a>
to protect it from unauthorized modifications, i.e. modifications without
having the original certificate.
The current implementation is based on the <!--<a
href="http://eid-applet.googlecode.com">eID Applet</a>-->
@@ -248,7 +252,7 @@ try (POIFSFileSystem fs = new POIFSFileS
integration (testing) with timestamp and revocation (OCSP) services.
</p>
<p>Further test examples can be found in the corresponding <a
href="https://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java?view=markup">test
class</a>.</p>
-
+
<p>If you want to use a hash algorithm with 64 bytes (currently only
applies to SHA512),
<a href="https://bz.apache.org/bugzilla/show_bug.cgi?id=42061">a base64
"feature"</a> in xmlsec
leads to line breaks in the digest values, which won't be accepted by
Office. To workaround this, you
@@ -261,8 +265,8 @@ try (POIFSFileSystem fs = new POIFSFileS
<source>
OPCPackage pkg = OPCPackage.open(..., PackageAccess.READ);
SignatureConfig sic = new SignatureConfig();
-sic.setOpcPackage(pkg);
SignatureInfo si = new SignatureInfo();
+si.setOpcPackage(pkg);
si.setSignatureConfig(sic);
boolean isValid = si.verifySignature();
...
@@ -292,11 +296,11 @@ X509Certificate x509 = (X509Certificate)
SignatureConfig signatureConfig = new SignatureConfig();
signatureConfig.setKey(keyPair.getPrivate());
signatureConfig.setSigningCertificateChain(Collections.singletonList(x509));
-OPCPackage pkg = OPCPackage.open(..., PackageAccess.READ_WRITE);
-signatureConfig.setOpcPackage(pkg);
// adding the signature document to the package
SignatureInfo si = new SignatureInfo();
+OPCPackage pkg = OPCPackage.open(..., PackageAccess.READ_WRITE);
+si.setOpcPackage(pkg);
si.setSignatureConfig(signatureConfig);
si.confirmSignature();
// optionally verify the generated signature
@@ -328,7 +332,7 @@ wb.close();
// process the
OPCPackage pkg = OPCPackage.open(new ByteArrayInputStream(bos.toByteArray()));
-signatureConfig.setOpcPackage(pkg);
+si.setOpcPackage(pkg);
si.confirmSignature();
bos.reset();
pkg.save(bos);
Modified:
poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/OOXMLURIDereferencer.java
URL:
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/OOXMLURIDereferencer.java?rev=1874671&r1=1874670&r2=1874671&view=diff
==============================================================================
---
poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/OOXMLURIDereferencer.java
(original)
+++
poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/OOXMLURIDereferencer.java
Sun Mar 1 22:20:38 2020
@@ -18,9 +18,9 @@
/* ====================================================================
This product contains an ASLv2 licensed version of the OOXML signer
package from the eID Applet project
- http://code.google.com/p/eid-applet/source/browse/trunk/README.txt
+ http://code.google.com/p/eid-applet/source/browse/trunk/README.txt
Copyright (C) 2008-2014 FedICT.
- ================================================================= */
+ ================================================================= */
package org.apache.poi.poifs.crypt.dsig;
@@ -42,33 +42,29 @@ import org.apache.poi.openxml4j.exceptio
import org.apache.poi.openxml4j.opc.PackagePart;
import org.apache.poi.openxml4j.opc.PackagePartName;
import org.apache.poi.openxml4j.opc.PackagingURIHelper;
-import org.apache.poi.poifs.crypt.dsig.SignatureConfig.SignatureConfigurable;
import org.apache.poi.util.POILogFactory;
import org.apache.poi.util.POILogger;
/**
* JSR105 URI dereferencer for Office Open XML documents.
*/
-public class OOXMLURIDereferencer implements URIDereferencer,
SignatureConfigurable {
+public class OOXMLURIDereferencer implements URIDereferencer {
private static final POILogger LOG =
POILogFactory.getLogger(OOXMLURIDereferencer.class);
- private SignatureConfig signatureConfig;
+ private SignatureInfo signatureInfo;
private URIDereferencer baseUriDereferencer;
- public void setSignatureConfig(SignatureConfig signatureConfig) {
- this.signatureConfig = signatureConfig;
+ public void setSignatureInfo(SignatureInfo signatureInfo) {
+ this.signatureInfo = signatureInfo;
+ baseUriDereferencer =
signatureInfo.getSignatureFactory().getURIDereferencer();
}
public Data dereference(URIReference uriReference, XMLCryptoContext
context) throws URIReferenceException {
- if (baseUriDereferencer == null) {
- baseUriDereferencer =
signatureConfig.getSignatureFactory().getURIDereferencer();
+ if (uriReference == null) {
+ throw new NullPointerException("URIReference cannot be null - call
setSignatureInfo(...) before");
}
-
- if (null == uriReference) {
- throw new NullPointerException("URIReference cannot be null");
- }
- if (null == context) {
+ if (context == null) {
throw new NullPointerException("XMLCryptoContext cannot be null");
}
@@ -82,7 +78,7 @@ public class OOXMLURIDereferencer implem
PackagePart part = findPart(uri);
if (part == null) {
LOG.log(POILogger.DEBUG, "cannot resolve, delegating to base DOM
URI dereferencer", uri);
- return this.baseUriDereferencer.dereference(uriReference, context);
+ return baseUriDereferencer.dereference(uriReference, context);
}
InputStream dataStream;
@@ -116,15 +112,14 @@ public class OOXMLURIDereferencer implem
LOG.log(POILogger.DEBUG, "illegal part name (expected)", uri);
return null;
}
-
+
PackagePartName ppn;
try {
ppn = PackagingURIHelper.createPartName(path);
+ return signatureInfo.getOpcPackage().getPart(ppn);
} catch (InvalidFormatException e) {
LOG.log(POILogger.WARN, "illegal part name (not expected)", uri);
return null;
}
-
- return signatureConfig.getOpcPackage().getPart(ppn);
}
}
Modified:
poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/SignatureConfig.java
URL:
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/SignatureConfig.java?rev=1874671&r1=1874670&r2=1874671&view=diff
==============================================================================
---
poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/SignatureConfig.java
(original)
+++
poi/trunk/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/SignatureConfig.java
Sun Mar 1 22:20:38 2020
@@ -27,12 +27,15 @@ import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.UUID;
+import java.util.function.Supplier;
+import java.util.stream.Collectors;
import javax.xml.crypto.URIDereferencer;
import javax.xml.crypto.dsig.CanonicalizationMethod;
@@ -53,11 +56,12 @@ import org.apache.poi.poifs.crypt.dsig.s
import org.apache.poi.poifs.crypt.dsig.services.TSPTimeStampService;
import org.apache.poi.poifs.crypt.dsig.services.TimeStampService;
import org.apache.poi.poifs.crypt.dsig.services.TimeStampServiceValidator;
+import org.apache.poi.util.Internal;
import org.apache.poi.util.LocaleUtil;
import org.apache.poi.util.POILogFactory;
import org.apache.poi.util.POILogger;
+import org.apache.poi.util.Removal;
import org.apache.xml.security.signature.XMLSignature;
-import org.w3c.dom.events.EventListener;
/**
* This class bundles the configuration options used for the existing
@@ -73,11 +77,16 @@ public class SignatureConfig {
private static final POILogger LOG =
POILogFactory.getLogger(SignatureConfig.class);
private static final String DigestMethod_SHA224 =
"http://www.w3.org/2001/04/xmldsig-more#sha224";
private static final String DigestMethod_SHA384 =
"http://www.w3.org/2001/04/xmldsig-more#sha384";
+ private static final String XMLSEC_SANTUARIO =
"org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI";
+ private static final String XMLSEC_JDK =
"org.jcp.xml.dsig.internal.dom.XMLDSigRI";
+ private static final List<Supplier<SignatureFacet>> DEFAULT_FACETS =
Arrays.asList(
+ OOXMLSignatureFacet::new,
+ KeyInfoSignatureFacet::new,
+ XAdESSignatureFacet::new,
+ Office2010SignatureFacet::new
+ );
- public interface SignatureConfigurable {
- void setSignatureConfig(SignatureConfig signatureConfig);
- }
private ThreadLocal<OPCPackage> opcPackage = new ThreadLocal<>();
private ThreadLocal<XMLSignatureFactory> signatureFactory = new
ThreadLocal<>();
@@ -94,7 +103,7 @@ public class SignatureConfig {
* the optional signature policy service used for XAdES-EPES.
*/
private SignaturePolicyService signaturePolicyService;
- private URIDereferencer uriDereferencer;
+ private URIDereferencer uriDereferencer = new OOXMLURIDereferencer();
private String canonicalizationMethod = CanonicalizationMethod.INCLUSIVE;
private boolean includeEntireCertificateChain = true;
@@ -161,7 +170,7 @@ public class SignatureConfig {
* with certain namespaces, so this EventListener is used to interfere
* with the marshalling process.
*/
- private EventListener signatureMarshalListener;
+ private SignatureMarshalListener signatureMarshalListener = new
SignatureMarshalDefaultListener();
/**
* Map of namespace uris to prefix
@@ -181,61 +190,11 @@ public class SignatureConfig {
*/
private boolean allowMultipleSignatures = false;
-
- /**
- * Inits and checks the config object.
- * If not set previously, complex configuration properties also get
- * created/initialized via this initialization call.
- *
- * @param onlyValidation if true, only a subset of the properties
- * is initialized, which are necessary for validation. If false,
- * also the other properties needed for signing are been taken care of
- */
- protected void init(boolean onlyValidation) {
- if (opcPackage == null) {
- throw new EncryptedDocumentException("opcPackage is null");
- }
- if (uriDereferencer == null) {
- uriDereferencer = new OOXMLURIDereferencer();
- }
- if (uriDereferencer instanceof SignatureConfigurable) {
- ((SignatureConfigurable)uriDereferencer).setSignatureConfig(this);
- }
- if (namespacePrefixes.isEmpty()) {
- /*
- * OOo doesn't like ds namespaces so per default prefixing is off.
- */
- // namespacePrefixes.put(XML_DIGSIG_NS, "");
- namespacePrefixes.put(OO_DIGSIG_NS, "mdssi");
- namespacePrefixes.put(XADES_132_NS, "xd");
- }
-
- if (onlyValidation) {
- return;
- }
-
- if (signatureMarshalListener == null) {
- signatureMarshalListener = new SignatureMarshalListener();
- }
-
- if (signatureMarshalListener instanceof SignatureConfigurable) {
-
((SignatureConfigurable)signatureMarshalListener).setSignatureConfig(this);
- }
-
- if (tspService != null) {
- tspService.setSignatureConfig(this);
- }
-
- if (signatureFacets.isEmpty()) {
- addSignatureFacet(new OOXMLSignatureFacet());
- addSignatureFacet(new KeyInfoSignatureFacet());
- addSignatureFacet(new XAdESSignatureFacet());
- addSignatureFacet(new Office2010SignatureFacet());
- }
-
- for (SignatureFacet sf : signatureFacets) {
- sf.setSignatureConfig(this);
- }
+ public SignatureConfig() {
+ // OOo doesn't like ds namespaces so per default prefixing is off.
+ // namespacePrefixes.put(XML_DIGSIG_NS, "");
+ namespacePrefixes.put(OO_DIGSIG_NS, "mdssi");
+ namespacePrefixes.put(XADES_132_NS, "xd");
}
/**
@@ -249,7 +208,11 @@ public class SignatureConfig {
* @return the list of facets, may be empty when the config object is not
initialized
*/
public List<SignatureFacet> getSignatureFacets() {
- return signatureFacets;
+ if (signatureFacets.isEmpty()) {
+ return
DEFAULT_FACETS.stream().map(Supplier::get).collect(Collectors.toList());
+ } else {
+ return signatureFacets;
+ }
}
/**
@@ -275,14 +238,22 @@ public class SignatureConfig {
/**
* @return the opc package to be used by this thread, stored as
thread-local
+ *
+ * @deprecated in POI 4.1.3 - use {@link
SignatureInfo#setOpcPackage(OPCPackage)} instead
*/
+ @Deprecated
+ @Removal(version = "5.0.0")
public OPCPackage getOpcPackage() {
return opcPackage.get();
}
/**
* @param opcPackage the opc package to be handled by this thread, stored
as thread-local
+ *
+ * @deprecated in POI 4.1.3 - use {@link
SignatureInfo#setOpcPackage(OPCPackage)} instead
*/
+ @Deprecated
+ @Removal(version = "5.0.0")
public void setOpcPackage(OPCPackage opcPackage) {
this.opcPackage.set(opcPackage);
}
@@ -378,14 +349,22 @@ public class SignatureConfig {
/**
* @return the dereferencer used for Reference/@URI attributes, defaults
to {@link OOXMLURIDereferencer}
+ *
+ * @deprecated in POI 4.1.3 - use {@link
SignatureInfo#getUriDereferencer()} instead
*/
+ @Deprecated
+ @Removal(version = "5.0.0")
public URIDereferencer getUriDereferencer() {
return uriDereferencer;
}
/**
* @param uriDereferencer the dereferencer used for Reference/@URI
attributes
+ *
+ * @deprecated in POI 4.1.3 - use {@link
SignatureInfo#setUriDereferencer(URIDereferencer)} instead
*/
+ @Deprecated
+ @Removal(version = "5.0.0")
public void setUriDereferencer(URIDereferencer uriDereferencer) {
this.uriDereferencer = uriDereferencer;
}
@@ -753,11 +732,10 @@ public class SignatureConfig {
/**
- * @return the event listener which is active while xml structure for
- * the signature is created.
+ * @return the event listener which is active while xml structure for the
signature is created.
* Defaults to {@link SignatureMarshalListener}
*/
- public EventListener getSignatureMarshalListener() {
+ public SignatureMarshalListener getSignatureMarshalListener() {
return signatureMarshalListener;
}
@@ -765,7 +743,7 @@ public class SignatureConfig {
* @param signatureMarshalListener the event listener watching the xml
structure
* generation for the signature
*/
- public void setSignatureMarshalListener(EventListener
signatureMarshalListener) {
+ public void setSignatureMarshalListener(SignatureMarshalListener
signatureMarshalListener) {
this.signatureMarshalListener = signatureMarshalListener;
}
@@ -898,85 +876,91 @@ public class SignatureConfig {
/**
* @param signatureFactory the xml signature factory, saved as thread-local
+ *
+ * @deprecated in POI 4.1.3 - use {@link
SignatureInfo#setSignatureFactory(XMLSignatureFactory)}
*/
+ @Deprecated
+ @Removal(version = "5.0.0")
public void setSignatureFactory(XMLSignatureFactory signatureFactory) {
this.signatureFactory.set(signatureFactory);
}
/**
* @return the xml signature factory (thread-local)
+ *
+ * @deprecated in POI 4.1.3 - will be handled by SignatureInfo internally
*/
+ @Deprecated
+ @Removal(version = "5.0.0")
public XMLSignatureFactory getSignatureFactory() {
- XMLSignatureFactory sigFac = signatureFactory.get();
- if (sigFac == null) {
- sigFac = XMLSignatureFactory.getInstance("DOM", getProvider());
- setSignatureFactory(sigFac);
- }
- return sigFac;
+ return signatureFactory.get();
}
/**
* @param keyInfoFactory the key factory, saved as thread-local
+ *
+ * @deprecated in POI 4.1.3 - use {@link
SignatureInfo#setKeyInfoFactory(KeyInfoFactory)}
*/
+ @Deprecated
+ @Removal(version = "5.0.0")
public void setKeyInfoFactory(KeyInfoFactory keyInfoFactory) {
this.keyInfoFactory.set(keyInfoFactory);
}
/**
* @return the key factory (thread-local)
+ *
+ * @deprecated in POI 4.1.3 - will be handled by SignatureInfo internally
*/
+ @Deprecated
+ @Removal(version = "5.0.0")
public KeyInfoFactory getKeyInfoFactory() {
- KeyInfoFactory keyFac = keyInfoFactory.get();
- if (keyFac == null) {
- keyFac = KeyInfoFactory.getInstance("DOM", getProvider());
- setKeyInfoFactory(keyFac);
- }
- return keyFac;
+ return keyInfoFactory.get();
}
/**
- * This method tests the existence of xml signature provider in the
following order:
- * <ul>
+ * Helper method to set provider
+ * @param provider the provider
+ * @deprecated in POI 4.1.3 - use {@link
SignatureInfo#setProvider(Provider)}
+ */
+ @Internal
+ @Deprecated
+ @Removal(version = "5.0.0")
+ public void setProvider(Provider provider) {
+ this.provider.set(provider);
+ }
+
+ /**
+ * @return the cached provider or null if not set before
+ *
+ * @deprecated in POI 4.1.3 - will be handled by SignatureInfo internally
+ */
+ @Deprecated
+ @Removal(version = "5.0.0")
+ public Provider getProvider() {
+ return provider.get();
+ }
+
+ /**
+ * Determine the possible classes for XMLSEC.
+ * The order is
+ * <ol>
* <li>the class pointed to by the system property "jsr105Provider"</li>
* <li>the Santuario xmlsec provider</li>
* <li>the JDK xmlsec provider</li>
- * </ul>
- *
- * For signing the classes are linked against the Santuario xmlsec, so
this might
- * only work for validation (not tested).
+ * </ol>
*
- * @return the xml dsig provider
+ * @return a list of possible XMLSEC provider class names
*/
- public Provider getProvider() {
- Provider prov = provider.get();
- if (prov == null) {
- String[] dsigProviderNames = {
- System.getProperty("jsr105Provider"),
- // Santuario xmlsec
- "org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI",
- // JDK xmlsec
- "org.jcp.xml.dsig.internal.dom.XMLDSigRI"
- };
- for (String pn : dsigProviderNames) {
- if (pn == null) {
- continue;
- }
- try {
- prov = (Provider)Class.forName(pn).newInstance();
- break;
- } catch (Exception e) {
- LOG.log(POILogger.DEBUG, "XMLDsig-Provider '"+pn+"' can't
be found - trying next.");
- }
- }
- }
-
- if (prov == null) {
- throw new RuntimeException("JRE doesn't support default xml
signature provider - set jsr105Provider system property!");
- }
-
- return prov;
+ public static String[] getProviderNames() {
+ // need to check every time, as the system property might have been
changed in the meantime
+ String sysProp = System.getProperty("jsr105Provider");
+ return (sysProp == null || "".equals(sysProp))
+ ? new String[]{XMLSEC_SANTUARIO, XMLSEC_JDK}
+ : new String[]{sysProp, XMLSEC_SANTUARIO, XMLSEC_JDK};
}
+
/**
* @return the cannonicalization method for XAdES-XL signing.
* Defaults to <code>EXCLUSIVE</code>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]