PDNonTerminalField.java (pdfbox-2.0.23-src) | : | PDNonTerminalField.java (pdfbox-2.0.24-src) | ||
---|---|---|---|---|
skipping to change at line 90 | skipping to change at line 90 | |||
return retval; | return retval; | |||
} | } | |||
@Override | @Override | |||
void importFDF(FDFField fdfField) throws IOException | void importFDF(FDFField fdfField) throws IOException | |||
{ | { | |||
super.importFDF(fdfField); | super.importFDF(fdfField); | |||
List<FDFField> fdfKids = fdfField.getKids(); | List<FDFField> fdfKids = fdfField.getKids(); | |||
List<PDField> children = getChildren(); | List<PDField> children = getChildren(); | |||
for (int i = 0; fdfKids != null && i < fdfKids.size(); i++) | if (fdfKids == null) | |||
{ | ||||
return; | ||||
} | ||||
for (int i = 0; i < fdfKids.size(); i++) | ||||
{ | { | |||
for (PDField pdChild : children) | for (PDField pdChild : children) | |||
{ | { | |||
FDFField fdfChild = fdfKids.get(i); | FDFField fdfChild = fdfKids.get(i); | |||
String fdfName = fdfChild.getPartialFieldName(); | String fdfName = fdfChild.getPartialFieldName(); | |||
if (fdfName != null && fdfName.equals(pdChild.getPartialName())) | if (fdfName != null && fdfName.equals(pdChild.getPartialName())) | |||
{ | { | |||
pdChild.importFDF(fdfChild); | pdChild.importFDF(fdfChild); | |||
} | } | |||
} | } | |||
skipping to change at line 112 | skipping to change at line 116 | |||
} | } | |||
@Override | @Override | |||
FDFField exportFDF() throws IOException | FDFField exportFDF() throws IOException | |||
{ | { | |||
FDFField fdfField = new FDFField(); | FDFField fdfField = new FDFField(); | |||
fdfField.setPartialFieldName(getPartialName()); | fdfField.setPartialFieldName(getPartialName()); | |||
fdfField.setValue(getValue()); | fdfField.setValue(getValue()); | |||
List<PDField> children = getChildren(); | List<PDField> children = getChildren(); | |||
List<FDFField> fdfChildren = new ArrayList<FDFField>(); | List<FDFField> fdfChildren = new ArrayList<FDFField>(children.size()); | |||
for (PDField child : children) | for (PDField child : children) | |||
{ | { | |||
fdfChildren.add(child.exportFDF()); | fdfChildren.add(child.exportFDF()); | |||
} | } | |||
fdfField.setKids(fdfChildren); | fdfField.setKids(fdfChildren); | |||
return fdfField; | return fdfField; | |||
} | } | |||
/** | /** | |||
skipping to change at line 262 | skipping to change at line 266 | |||
* @param value | * @param value | |||
*/ | */ | |||
public void setDefaultValue(COSBase value) | public void setDefaultValue(COSBase value) | |||
{ | { | |||
getCOSObject().setItem(COSName.V, value); | getCOSObject().setItem(COSName.V, value); | |||
} | } | |||
@Override | @Override | |||
public List<PDAnnotationWidget> getWidgets() | public List<PDAnnotationWidget> getWidgets() | |||
{ | { | |||
List<PDAnnotationWidget> emptyList = Collections.emptyList(); | return Collections.emptyList(); | |||
return Collections.unmodifiableList(emptyList); | ||||
} | } | |||
} | } | |||
End of changes. 3 change blocks. | ||||
4 lines changed or deleted | 7 lines changed or added |