mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-29 05:43: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
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue