From 7d5701e0a327448484ccee968e12ae3d9162d407 Mon Sep 17 00:00:00 2001 From: David Gageot Date: Tue, 12 May 2015 10:42:31 +0200 Subject: Useless code --- .../src/main/java/net/sourceforge/pmd/cpd/SourceCode.java | 4 ++-- .../src/main/java/net/sourceforge/pmd/cpd/TokenEntry.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'sonar-duplications/src/main/java/net/sourceforge/pmd') 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>(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 lines = new ArrayList(); + List 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 { - private static final Map TOKENS = new HashMap(); + private static final Map TOKENS = new HashMap<>(); private static int tokenCount = 0; /** -- cgit v1.2.3