Lint issues (#2114)

* Dangling Javadoc comments

* Replace for loop with foreach

* Explicit type can be replaced with <>

* Anonymous type can be replaced with lambda

* Lambda can be replaced with method reference

* Remove redundant methods

* Use capital L for long literals

* Remove unnecessary StringBuilder
This commit is contained in:
Adam Jones 2018-12-21 11:09:04 +00:00 committed by neslihanturan
parent 8e967a3698
commit f04503bb3e
26 changed files with 214 additions and 295 deletions

View file

@ -76,14 +76,7 @@ public class BookmarkLocationsFragment extends DaggerFragment {
super.onViewCreated(view, savedInstanceState);
progressBar.setVisibility(View.VISIBLE);
recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
recyclerView.setAdapter(
adapterFactory.create(
new ArrayList<Place>(),
() -> {
initList();
}
)
);
recyclerView.setAdapter(adapterFactory.create(new ArrayList<>(), this::initList));
}
@Override

View file

@ -32,7 +32,7 @@ public class BookmarkPicturesController {
List<Media> loadBookmarkedPictures() {
List<Bookmark> bookmarks = bookmarkDao.getAllBookmarks();
currentBookmarks = bookmarks;
ArrayList<Media> medias = new ArrayList<Media>();
ArrayList<Media> medias = new ArrayList<>();
for (Bookmark bookmark : bookmarks) {
List<Media> tmpMedias = mediaWikiApi.searchImages(bookmark.getMediaName(), 0);
for (Media m : tmpMedias) {