aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-duplications/src/main/java/net
diff options
context:
space:
mode:
authorDavid Gageot <david@gageot.net>2015-05-12 10:42:31 +0200
committerDavid Gageot <david@gageot.net>2015-05-12 14:33:41 +0200
commit7d5701e0a327448484ccee968e12ae3d9162d407 (patch)
tree48765dedbd2125480a531d71e30801ee44d8bce9 /sonar-duplications/src/main/java/net
parent4bab89867b0484fa9d21d0d54e6d7687d2b2f5bf (diff)
downloadsonarqube-7d5701e0a327448484ccee968e12ae3d9162d407.tar.gz
sonarqube-7d5701e0a327448484ccee968e12ae3d9162d407.zip
Useless code
Diffstat (limited to 'sonar-duplications/src/main/java/net')
-rw-r--r--sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/SourceCode.java4
-rw-r--r--sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/TokenEntry.java2
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;
/**