From 7c45001a63725d8898496c84c5e51fae0263a720 Mon Sep 17 00:00:00 2001 From: Zeeshan Asghar Date: Wed, 20 Jan 2016 15:51:03 +0500 Subject: squid:UselessPrenthesesCheck Useless parentheses around expression should be removed to prevent any misunderstanging --- .../src/main/java/net/sourceforge/pmd/cpd/SourceCode.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sonar-duplications/src') 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 c124d395535..eae293c0d6f 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 @@ -144,7 +144,7 @@ public class SourceCode { public String getSlice(int startLine, int endLine) { StringBuffer sb = new StringBuffer(); List lines = cl.getCode(); - for (int i = (startLine == 0 ? startLine : (startLine - 1)); i < endLine && i < lines.size(); i++) { + for (int i = (startLine == 0 ? startLine : startLine - 1); i < endLine && i < lines.size(); i++) { if (sb.length() != 0) { sb.append(EOL); } -- cgit v1.2.3