diff options
Diffstat (limited to 'sonar-duplications')
-rw-r--r-- | sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/SourceCode.java | 2 |
1 files changed, 1 insertions, 1 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 675c3f152f2..1b9937784cd 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 @@ -145,7 +145,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); } |