aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2008-01-14 11:02:34 +0000
committerJeremias Maerki <jeremias@apache.org>2008-01-14 11:02:34 +0000
commit9ef58f47298a2fb14d866e296f1c8b47607e236e (patch)
tree396c69e96e4bdeac13254b1886e65ff5616ac3c7 /src/java/org/apache
parente77d6863bbe2671af4a34d250417867264631238 (diff)
downloadxmlgraphics-fop-9ef58f47298a2fb14d866e296f1c8b47607e236e.tar.gz
xmlgraphics-fop-9ef58f47298a2fb14d866e296f1c8b47607e236e.zip
Restore default constructor for PDFArray.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@611767 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache')
-rw-r--r--src/java/org/apache/fop/pdf/PDFArray.java21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/java/org/apache/fop/pdf/PDFArray.java b/src/java/org/apache/fop/pdf/PDFArray.java
index 2cb2adb1d..ec713b313 100644
--- a/src/java/org/apache/fop/pdf/PDFArray.java
+++ b/src/java/org/apache/fop/pdf/PDFArray.java
@@ -46,6 +46,13 @@ public class PDFArray extends PDFObject {
}
/**
+ * Create a new, empty array object with no parent.
+ */
+ public PDFArray() {
+ this(null);
+ }
+
+ /**
* Create an array object.
* @param parent the array's parent if any
* @param values the actual array wrapped by this object
@@ -124,18 +131,10 @@ public class PDFArray extends PDFObject {
* Adds a new value to the array.
* @param obj the value
*/
- public void add(PDFObject obj) {
- if (obj != null) {
- obj.setParent(this);
- }
- this.values.add(obj);
- }
-
- /**
- * Adds a new value to the array.
- * @param obj the value
- */
public void add(Object obj) {
+ if (obj instanceof PDFObject) {
+ ((PDFObject)obj).setParent(this);
+ }
this.values.add(obj);
}