diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2021-09-23 11:16:04 -0500 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2021-09-24 20:03:10 +0000 |
commit | 215f8403a6c4a131b9592457fd95a280274237de (patch) | |
tree | 9412c0030b97b4e40563a882ababea60189270c6 /sonar-duplications/src | |
parent | 5377194709960576b1367a220c6ba20ce6f41ef0 (diff) | |
download | sonarqube-215f8403a6c4a131b9592457fd95a280274237de.tar.gz sonarqube-215f8403a6c4a131b9592457fd95a280274237de.zip |
Fix code quality issues
Diffstat (limited to 'sonar-duplications/src')
-rw-r--r-- | sonar-duplications/src/main/java/org/sonar/duplications/detector/original/BlocksGroup.java | 5 | ||||
-rw-r--r-- | sonar-duplications/src/main/java/org/sonar/duplications/java/JavaTokenProducer.java | 7 |
2 files changed, 5 insertions, 7 deletions
diff --git a/sonar-duplications/src/main/java/org/sonar/duplications/detector/original/BlocksGroup.java b/sonar-duplications/src/main/java/org/sonar/duplications/detector/original/BlocksGroup.java index 67847f76c3f..65e182b11eb 100644 --- a/sonar-duplications/src/main/java/org/sonar/duplications/detector/original/BlocksGroup.java +++ b/sonar-duplications/src/main/java/org/sonar/duplications/detector/original/BlocksGroup.java @@ -30,18 +30,17 @@ import org.sonar.duplications.utils.FastStringComparator; * Set of {@link Block}s, which internally stored as a sorted list. */ final class BlocksGroup { + final List<Block> blocks; /** * Factory method. - * + * * @return new empty group */ public static BlocksGroup empty() { return new BlocksGroup(); } - protected final List<Block> blocks; - private BlocksGroup() { this.blocks = new ArrayList<>(); } diff --git a/sonar-duplications/src/main/java/org/sonar/duplications/java/JavaTokenProducer.java b/sonar-duplications/src/main/java/org/sonar/duplications/java/JavaTokenProducer.java index 2e4f7c732bb..8df5f633523 100644 --- a/sonar-duplications/src/main/java/org/sonar/duplications/java/JavaTokenProducer.java +++ b/sonar-duplications/src/main/java/org/sonar/duplications/java/JavaTokenProducer.java @@ -32,10 +32,6 @@ import org.sonar.duplications.token.TokenChunker; * </p> */ public final class JavaTokenProducer { - - private JavaTokenProducer() { - } - private static final String NORMALIZED_CHARACTER_LITERAL = "$CHARS"; private static final String NORMALIZED_NUMERIC_LITERAL = "$NUMBER"; @@ -45,6 +41,9 @@ public final class JavaTokenProducer { private static final String FLOAT_SUFFIX = "[fFdD]"; private static final String INT_SUFFIX = "[lL]"; + private JavaTokenProducer() { + } + public static TokenChunker build() { return TokenChunker.builder() // White Space |