https://bz.apache.org/bugzilla/show_bug.cgi?id=65715

            Bug ID: 65715
           Summary: An inexplicable ‘break’ statement in XSSFSheet
           Product: POI
           Version: unspecified
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSSF
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

public XSSFDrawing getDrawingPatriarch() {
        CTDrawing ctDrawing = getCTDrawing();
        if (ctDrawing != null) {
            // Search the referenced drawing in the list of the sheet's
relations
            for (RelationPart rp : getRelationParts()){
                POIXMLDocumentPart p = rp.getDocumentPart();
                if (p instanceof XSSFDrawing) {
                    XSSFDrawing dr = (XSSFDrawing)p;
                    String drId = rp.getRelationship().getId();
                    if (drId.equals(ctDrawing.getId())){
                        return dr;
                    }
                    break;
                }
            }
            LOG.atError().log("Can't find drawing with id={} in the list of the
sheet's relationships", ctDrawing.getId());
        }
        return null;
    }

I don‘t know why there is a ’break‘ statement.It makes the loop
meaningless.Actually,the 'if' in front means there may be multiple drawing in
one sheet.So i think this maybe a bug.

-- 
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