]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Synchronize the clone() method
authorPeter Bernard West <pbwest@apache.org>
Sun, 15 Feb 2004 03:45:52 +0000 (03:45 +0000)
committerPeter Bernard West <pbwest@apache.org>
Sun, 15 Feb 2004 03:45:52 +0000 (03:45 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@197354 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/fo/pagination/PageSequenceMaster.java

index 480d3cbb42546766520173a5b70e11c969716e03..cfb5445b108cc002ef2242ce11f57919a3b6d0ea 100644 (file)
@@ -480,6 +480,20 @@ public class PageSequenceMaster {
          * Returns a new iterator across <code>masters</code>
          */
         public PageMasterIterator() {}
+        
+        /**
+         * Clone the iterator.  The purpose of this operation is to allow
+         * interested methods to attempt layouts of the same flow data using
+         * different masters, e.g., laying out a 'last' page and 'rest' page
+         * from the same flow data.
+         * 
+         * @see java.lang.Object#clone()
+         */
+        protected Object clone() throws CloneNotSupportedException {
+            synchronized (this) {
+                return super.clone();
+            }
+        }
 
         /**
          * @return true if any repetitions on any masters remain in the