xmlgraphics-fop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerem...@apache.org
Subject svn commit: r611767 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFArray.java
Date Mon, 14 Jan 2008 11:02:38 GMT
Author: jeremias
Date: Mon Jan 14 03:02:34 2008
New Revision: 611767

URL: http://svn.apache.org/viewvc?rev=611767&view=rev
Log:
Restore default constructor for PDFArray.

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFArray.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFArray.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFArray.java?rev=611767&r1=611766&r2=611767&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFArray.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFArray.java Mon Jan 14 03:02:34 2008
@@ -46,6 +46,13 @@
     }
 
     /**
+     * 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 @@
      * 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);
     }
     



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org


Mime
View raw message