mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-29 22:03:55 +01:00
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:
parent
8e967a3698
commit
f04503bb3e
26 changed files with 214 additions and 295 deletions
|
|
@ -779,7 +779,7 @@ public class ApacheHttpClientMediaWikiApi implements MediaWikiApi {
|
|||
}
|
||||
|
||||
if (imageNodes == null) {
|
||||
return new ArrayList<Media>();
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
List<Media> images = new ArrayList<>();
|
||||
|
|
@ -819,7 +819,7 @@ public class ApacheHttpClientMediaWikiApi implements MediaWikiApi {
|
|||
}
|
||||
|
||||
if (categoryNodes == null) {
|
||||
return new ArrayList<String>();
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
List<String> categories = new ArrayList<>();
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ public class CustomApiResult {
|
|||
|
||||
public ArrayList<CustomApiResult> getNodes(String xpath) {
|
||||
try {
|
||||
ArrayList<CustomApiResult> results = new ArrayList<CustomApiResult>();
|
||||
ArrayList<CustomApiResult> results = new ArrayList<>();
|
||||
NodeList nodes = (NodeList) evaluator.evaluate(xpath, doc, XPathConstants.NODESET);
|
||||
for(int i = 0; i < nodes.getLength(); i++) {
|
||||
results.add(new CustomApiResult(nodes.item(i)));
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ public class CustomMwApi {
|
|||
private CustomMwApi api;
|
||||
|
||||
RequestBuilder(CustomMwApi api) {
|
||||
params = new HashMap<String, Object>();
|
||||
params = new HashMap<>();
|
||||
this.api = api;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue