You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by je...@apache.org on 2008/01/14 12:02:38 UTC
svn commit: r611767 -
/xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFArray.java
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