diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2015-06-04 12:21:37 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2015-06-04 12:21:46 +0200 |
commit | 93e2db9c467f56954a1a2f33a45ab57a3cf24d75 (patch) | |
tree | 231c92b60cdd7b0462b0ce8a5517ea45235a530b /sonar-duplications | |
parent | c85a386fbdd2994e6a32cb2ad24144fedd027db6 (diff) | |
download | sonarqube-93e2db9c467f56954a1a2f33a45ab57a3cf24d75.tar.gz sonarqube-93e2db9c467f56954a1a2f33a45ab57a3cf24d75.zip |
Fix quality flaws
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); } |