https://issues.apache.org/bugzilla/show_bug.cgi?id=49649

           Summary: The class org.apache.poi.hssf.record.XXX needs to
                    define a clone method
           Product: POI
           Version: 3.7-dev
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSSF
        AssignedTo: [email protected]
        ReportedBy: [email protected]


Created an attachment (id=25803)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25803)
Test-code and quick-and-dirty patch for clone exception problem

Got exceptions from wb.cloneSheet() method: 

java.lang.RuntimeException: The class
org.apache.poi.hssf.record.HeaderFooterRecord needs to define a clone method

java.lang.RuntimeException: The class org.apache.poi.hssf.record.FeatHdrRecord
needs to define a clone method

java.lang.RuntimeException: The class org.apache.poi.hssf.record.UserSViewBegin
needs to define a clone method

Exceptions are from different excel-files, but problem is common; I used to be
able to clone some sheets and with current version poi-3.7-beta2 at SVN r965267
not anymore.

Got some old POI versions hanging around, and all above cases do clone fine
with poi-3.6-beta1 at SVN r816626. I think problem was introduced in releases
835183, 894018 and 892468, when corresponding classes were introduced.

Quick-and-dirty solution was to implement clone with cloneViaReserialise. Seems
to work, at least.

Attached test-files plus test-code to re-produce problem, as well as patch for
quick-and-dirty solution.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to