You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2014/12/21 21:10:37 UTC
svn commit: r1647201 - in
/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel:
PDDocument.java PDPage.java
Author: tilman
Date: Sun Dec 21 20:10:37 2014
New Revision: 1647201
URL: http://svn.apache.org/r1647201
Log:
PDFBOX-2576: annotation list is never null, fix javadoc and remove unneeded code
Modified:
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPage.java
Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java?rev=1647201&r1=1647200&r2=1647201&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java Sun Dec 21 20:10:37 2014
@@ -351,12 +351,6 @@ public class PDDocument implements Close
}
// Get the annotations of the page and append the signature-annotation to it
- if (annotations == null)
- {
- annotations = new COSArrayList();
- page.setAnnotations(annotations);
- }
-
// take care that page and acroforms do not share the same array (if so, we don't need to add it twice)
if (!(annotations instanceof COSArrayList &&
acroFormFields instanceof COSArrayList &&
Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPage.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPage.java?rev=1647201&r1=1647200&r2=1647201&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPage.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPage.java Sun Dec 21 20:10:37 2014
@@ -540,8 +540,8 @@ public class PDPage implements COSObject
/**
* This will return a list of the Annotations for this page.
*
- * @return List of the PDAnnotation objects.
- * @throws IOException If there is an error while creating the annotations.
+ * @return List of the PDAnnotation objects, never null.
+ * @throws IOException If there is an error while creating the annotation list.
*/
public List<PDAnnotation> getAnnotations() throws IOException
{