diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2015-01-20 12:18:37 +0100 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2015-01-20 12:18:37 +0100 |
commit | 9030b566aa37558726e14138c292326f93699f8f (patch) | |
tree | d9e0de9bb728ad1d569aa072f17aac73cd364e14 /sonar-plugin-api | |
parent | 143fa804c8bc20968026caa376f3922f795cb6c7 (diff) | |
download | sonarqube-9030b566aa37558726e14138c292326f93699f8f.tar.gz sonarqube-9030b566aa37558726e14138c292326f93699f8f.zip |
SONAR-5077 Special case of empty files
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/DefaultInputFile.java | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/DefaultInputFile.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/DefaultInputFile.java index 391ac575f32..411e3f8389b 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/DefaultInputFile.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/DefaultInputFile.java @@ -39,8 +39,9 @@ public class DefaultInputFile implements InputFile, Serializable { private String hash; private int lines; private String encoding; - long[] originalLineOffsets; - byte[][] lineHashes; + private long[] originalLineOffsets; + private byte[][] lineHashes; + private boolean empty; public DefaultInputFile(String moduleKey, String relativePath) { this.moduleKey = moduleKey; @@ -168,6 +169,15 @@ public class DefaultInputFile implements InputFile, Serializable { return this; } + public boolean isEmpty() { + return this.empty; + } + + public DefaultInputFile setEmpty(boolean empty) { + this.empty = empty; + return this; + } + @Override public boolean equals(Object o) { if (this == o) { |