diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2016-01-30 14:01:58 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2016-01-30 14:01:58 +0100 |
commit | b11816776254f69a0dd7a25c32260b2d77aaa358 (patch) | |
tree | 483c9e6fd37e635c307256eaf877a70a97d86725 /sonar-duplications/src/main | |
parent | 97d1aafc328e6a7e7692cb75f2f85a46594a1aa7 (diff) | |
download | sonarqube-b11816776254f69a0dd7a25c32260b2d77aaa358.tar.gz sonarqube-b11816776254f69a0dd7a25c32260b2d77aaa358.zip |
Fix minor quality flaws
Diffstat (limited to 'sonar-duplications/src/main')
-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 eae293c0d6f..c124d395535 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); } |