aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-duplications/src
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2015-06-04 12:21:37 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2015-06-04 12:21:46 +0200
commit93e2db9c467f56954a1a2f33a45ab57a3cf24d75 (patch)
tree231c92b60cdd7b0462b0ce8a5517ea45235a530b /sonar-duplications/src
parentc85a386fbdd2994e6a32cb2ad24144fedd027db6 (diff)
downloadsonarqube-93e2db9c467f56954a1a2f33a45ab57a3cf24d75.tar.gz
sonarqube-93e2db9c467f56954a1a2f33a45ab57a3cf24d75.zip
Fix quality flaws
Diffstat (limited to 'sonar-duplications/src')
-rw-r--r--sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/SourceCode.java2
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);
}