Skip to content

Commit e8db428

Browse files
committed
fixed issue commons-app#3044
1 parent 160fdb5 commit e8db428

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

app/src/main/java/fr/free/nrw/commons/contributions/ContributionDao.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,9 @@ ContentValues toContentValues(Contribution contribution) {
128128
*/
129129

130130
private String convertMapToString(HashMap<String, String> captions) {
131-
Iterator iter = (Iterator) captions.keySet().iterator();
132131
StringBuilder captionListString = new StringBuilder();
133-
while(iter.hasNext()) {
134-
Map.Entry entry = (Map.Entry) iter.next();
135-
String individualDescription = String.format("{{%s|1=%s}}", entry.getKey(),
136-
entry.getValue());
132+
for (Map.Entry<String, String> entry : captions.entrySet()) {
133+
String individualDescription = String.format("{{%s|1=%s}}", entry.getKey(), entry.getValue());
137134
captionListString.append(individualDescription);
138135
}
139136
return String.valueOf(captionListString);

0 commit comments

Comments
 (0)