Skip to content

Commit 547f2a0

Browse files
committed
Replace 'removeAll()' with 'clear()'
1 parent 825cdaf commit 547f2a0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/src/main/java/fr/free/nrw/commons/Media.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ public ArrayList<String> getCategories() {
173173
}
174174

175175
public void setCategories(List<String> categories) {
176-
this.categories.removeAll(this.categories);
176+
this.categories.clear();
177177
this.categories.addAll(categories);
178178
}
179179

app/src/main/java/fr/free/nrw/commons/media/MediaDetailFragment.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ protected void onPostExecute(Boolean success) {
235235
coordinates.setText(prettyCoordinates(media));
236236
uploadedDate.setText(prettyUploadedDate(media));
237237

238-
categoryNames.removeAll(categoryNames);
238+
categoryNames.clear();
239239
categoryNames.addAll(media.getCategories());
240240

241241
categoriesLoaded = true;
@@ -280,7 +280,7 @@ public void onLoadingComplete(String s, View view, Bitmap bitmap) {
280280
desc.setText(prettyDescription(media));
281281
license.setText(prettyLicense(media));
282282

283-
categoryNames.removeAll(categoryNames);
283+
categoryNames.clear();
284284
categoryNames.addAll(media.getCategories());
285285

286286
categoriesLoaded = true;

0 commit comments

Comments
 (0)