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

@ -8,8 +8,8 @@ import java.util.Set;
*/
public class BiMap<K, V> {
private HashMap<K, V> map = new HashMap<K, V>();
private HashMap<V, K> inversedMap = new HashMap<V, K>();
private HashMap<K, V> map = new HashMap<>();
private HashMap<V, K> inversedMap = new HashMap<>();
public void put(K k, V v) {
map.put(k, v);

View file

@ -88,14 +88,13 @@ public class ContributionUtils {
*/
public static void emptyTemporaryDirectory() {
File dir = new File(TEMP_EXTERNAL_DIRECTORY);
if (dir.isDirectory())
{
if (dir.isDirectory()) {
String[] children = dir.list();
if (children != null && children.length >0) {
for (int i = 0; i < children.length; i++)
{
new File(dir, children[i]).delete();
}
if (children == null) return;
for (String child : children) {
new File(dir, child).delete();
}
}
}