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.
Thanks - does look strange. I've modified it with r1895446
should be r1895447
I ran a test in jdoodle and break does leave the for loop early. ``` import java.util.*; public class MyClass { public static void main(String args[]) { ArrayList<String> strs = new ArrayList<>(); strs.add("aon"); strs.add("dó"); strs.add("trí"); for(String str : strs) { System.out.println(str); break; } } } ``` In this case, only `aon` gets printed.