diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2019-07-24 07:39:46 -0500 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2019-07-24 20:21:14 +0200 |
commit | d95a02b5fc788882ad59ad338b6a0b2a879dd2f3 (patch) | |
tree | 790a43558aa6f75e735e5be278993a5a07aa494b /sonar-plugin-api-impl | |
parent | fb78ba2317ac775bedd82c84cb1411a6abc10d45 (diff) | |
download | sonarqube-d95a02b5fc788882ad59ad338b6a0b2a879dd2f3.tar.gz sonarqube-d95a02b5fc788882ad59ad338b6a0b2a879dd2f3.zip |
SONAR-11778 Measure 'new lines' doesn't match 'lines' if the file ends with new line
Diffstat (limited to 'sonar-plugin-api-impl')
-rw-r--r-- | sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/DefaultInputFile.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/DefaultInputFile.java b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/DefaultInputFile.java index 4a48bf9a896..0d019a6d29c 100644 --- a/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/DefaultInputFile.java +++ b/sonar-plugin-api-impl/src/main/java/org/sonar/api/batch/fs/internal/DefaultInputFile.java @@ -340,7 +340,7 @@ public class DefaultInputFile extends DefaultInputComponent implements InputFile "%s is not a valid line offset for %s. File %s has %s character(s) at line %s", pointer.lineOffset(), owner, this, lineLength, pointer.line()); } - private int lineLength(int line) { + public int lineLength(int line) { return originalLineEndOffsets()[line - 1] - originalLineStartOffsets()[line - 1]; } |