Bug 31092

Summary: ObjRecord.clone()
Product: POI Reporter: Oliver Jonas <oliver>
Component: HSSFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal CC: jajakarta
Priority: P3    
Version: 2.5-FINAL   
Target Milestone: ---   
Hardware: Other   
OS: other   

Description Oliver Jonas 2004-09-07 15:03:32 UTC
Currently reads:

public Object clone()
    {
        ObjRecord rec = new ObjRecord();
        rec.subrecords = new ArrayList();

        for ( Iterator iterator = subrecords.iterator(); iterator.hasNext(); )
            subrecords.add(( (Record) iterator.next() ).clone());

        return rec;
    }

Guess it should read:

    public Object clone()
    {
        ObjRecord rec = new ObjRecord();
        rec.subrecords = new ArrayList();

        for ( Iterator iterator = subrecords.iterator(); iterator.hasNext(); )
            rec.subrecords.add(( (Record) iterator.next() ).clone());

        return rec;
    }
Comment 1 Jason Height 2004-09-24 03:33:22 UTC
I have committed a patch to fix this. Hopefully in the next few weeks i can work
though some of these smaller bugs in bugzilla to commit fixes.

Jason
Comment 2 Josh Micich 2008-05-08 22:24:07 UTC
*** Bug 40508 has been marked as a duplicate of this bug. ***