Summary: [PATCH] Bring clone() in line with the recommendations
                    in Object.clone()
           Product: Fop
           Version: 1.1dev
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: general

Created an attachment (id=25892)
 --> (

This patch tries to fix the problems with the clone method as reported by

The fix is not straightforward. The current design deviates from the design
advocated by findbugs and the documentation of Object.clone(). It is sometimes
hard to guess the author's intention with the original clone method. Often the
clone is not completely deep; was this intentional or not? This patch makes
almost always deep copies, esp. in the subclasses of AreaTreeObject. This patch
passes all existing junit tests. Since findbugs requires more memory than my
machine has, I could not check if this patch removes all findbugs warnings for

How does clone differ from a copy constructor? Is it a bad situation to have
both a clone method and a copy constructor? Is it advisable to delete one of

Because it is not straightforward, I submit this as a patch, instead of
committing it right away.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to