diff options
Diffstat (limited to 'sonar-duplications/src/main/java/net')
-rw-r--r-- | sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/SourceCode.java | 4 | ||||
-rw-r--r-- | sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/TokenEntry.java | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/SourceCode.java b/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/SourceCode.java index cf886d01122..57501d25d7a 100644 --- a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/SourceCode.java +++ b/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/SourceCode.java @@ -50,7 +50,7 @@ public class SourceCode { if (c != null) { return c; } - this.code = new SoftReference<List<String>>(load()); + this.code = new SoftReference<>(load()); return code.get(); } @@ -62,7 +62,7 @@ public class SourceCode { LineNumberReader lnr = null; try { lnr = new LineNumberReader(getReader()); - List<String> lines = new ArrayList<String>(); + List<String> lines = new ArrayList<>(); String currentLine; while ((currentLine = lnr.readLine()) != null) { lines.add(currentLine); diff --git a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/TokenEntry.java b/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/TokenEntry.java index be1bfb4bc83..395c9f9bdc2 100644 --- a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/TokenEntry.java +++ b/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/TokenEntry.java @@ -34,7 +34,7 @@ import java.util.Map; */ public class TokenEntry implements Comparable<TokenEntry> { - private static final Map<String, Integer> TOKENS = new HashMap<String, Integer>(); + private static final Map<String, Integer> TOKENS = new HashMap<>(); private static int tokenCount = 0; /** |