このコードはエラー This method access the value of a Map entry, using a key that was received from a keySet iterator. をスローします。Map.get(key) ルックアップを避けるために、マップの entrySet で反復子を使用する方が効率的です。言い換えの仕方を教えてください
if (docPropertiesMap != null) {
Iterator<String> properties = docPropertiesMap.keySet().iterator();
IDocProperty[] docProperties = new IDocProperty[docPropertiesMap
.size()];
int iArrIndex = 0;
while (properties.hasNext()) {
String strPropName = properties.next();
String[] propValue = docPropertiesMap.get(strPropName);
IDocProperty docProperty = (IDocProperty) FDMAFactory
.getDataObject("DocProperty");
docProperty.setPropertyName(strPropName);
docProperty.setArrPropertyValues(propValue);
docProperties[iArrIndex++] = docProperty;
}
metadata.setArrDocProperties(docProperties);
return metadata;
}