From 736c775bfc2cde38a53e4d43f858d3a3b6728c34 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Fri, 10 Oct 2014 00:01:22 +0200 Subject: Add missing @Override annotations --- sonar-colorizer/src/main/java/org/sonar/colorizer/HtmlCodeBuilder.java | 3 +++ .../src/main/java/org/sonar/colorizer/InlineDocTokenizer.java | 1 + .../src/main/java/org/sonar/colorizer/JavaAnnotationTokenizer.java | 1 + .../src/main/java/org/sonar/colorizer/JavaConstantTokenizer.java | 1 + .../src/main/java/org/sonar/colorizer/LiteralTokenizer.java | 1 + .../src/main/java/org/sonar/colorizer/MultilinesDocTokenizer.java | 1 + 6 files changed, 8 insertions(+) (limited to 'sonar-colorizer') diff --git a/sonar-colorizer/src/main/java/org/sonar/colorizer/HtmlCodeBuilder.java b/sonar-colorizer/src/main/java/org/sonar/colorizer/HtmlCodeBuilder.java index c7f9f3d3a7e..35b7b7f69ac 100644 --- a/sonar-colorizer/src/main/java/org/sonar/colorizer/HtmlCodeBuilder.java +++ b/sonar-colorizer/src/main/java/org/sonar/colorizer/HtmlCodeBuilder.java @@ -30,6 +30,7 @@ public class HtmlCodeBuilder implements Appendable { private StringBuilder colorizedCode = new StringBuilder(); private Map variables = new HashMap(); + @Override public Appendable append(CharSequence csq) { for (int i = 0; i < csq.length(); i++) { append(csq.charAt(i)); @@ -37,6 +38,7 @@ public class HtmlCodeBuilder implements Appendable { return this; } + @Override public Appendable append(char c) { if (c == '<') { colorizedCode.append("<"); @@ -50,6 +52,7 @@ public class HtmlCodeBuilder implements Appendable { return this; } + @Override public Appendable append(CharSequence csq, int start, int end) { for (int i = start; i < end; i++) { append(csq.charAt(i)); diff --git a/sonar-colorizer/src/main/java/org/sonar/colorizer/InlineDocTokenizer.java b/sonar-colorizer/src/main/java/org/sonar/colorizer/InlineDocTokenizer.java index 7c5b0c851aa..acd00546716 100644 --- a/sonar-colorizer/src/main/java/org/sonar/colorizer/InlineDocTokenizer.java +++ b/sonar-colorizer/src/main/java/org/sonar/colorizer/InlineDocTokenizer.java @@ -50,6 +50,7 @@ public abstract class InlineDocTokenizer extends Tokenizer { } private static final EndMatcher LINE_END_MATCHER = new EndMatcher() { + @Override public boolean match(int endFlag) { return endFlag == '\r' || endFlag == '\n'; } diff --git a/sonar-colorizer/src/main/java/org/sonar/colorizer/JavaAnnotationTokenizer.java b/sonar-colorizer/src/main/java/org/sonar/colorizer/JavaAnnotationTokenizer.java index fc7cdf6b6d2..0394bedaa68 100644 --- a/sonar-colorizer/src/main/java/org/sonar/colorizer/JavaAnnotationTokenizer.java +++ b/sonar-colorizer/src/main/java/org/sonar/colorizer/JavaAnnotationTokenizer.java @@ -33,6 +33,7 @@ public class JavaAnnotationTokenizer extends Tokenizer { } private static final EndMatcher END_TOKEN_MATCHER = new EndMatcher() { + @Override public boolean match(int endFlag) { return !Character.isJavaIdentifierPart(endFlag); } diff --git a/sonar-colorizer/src/main/java/org/sonar/colorizer/JavaConstantTokenizer.java b/sonar-colorizer/src/main/java/org/sonar/colorizer/JavaConstantTokenizer.java index 3216b720ef6..afc1993f9a6 100644 --- a/sonar-colorizer/src/main/java/org/sonar/colorizer/JavaConstantTokenizer.java +++ b/sonar-colorizer/src/main/java/org/sonar/colorizer/JavaConstantTokenizer.java @@ -72,6 +72,7 @@ public class JavaConstantTokenizer extends Tokenizer { private EndMatcher endTokenMatcher = new EndMatcher() { + @Override public boolean match(int endFlag) { return !isJavaConstantPart(endFlag); } diff --git a/sonar-colorizer/src/main/java/org/sonar/colorizer/LiteralTokenizer.java b/sonar-colorizer/src/main/java/org/sonar/colorizer/LiteralTokenizer.java index 42161a86d3a..6a1007d5e73 100644 --- a/sonar-colorizer/src/main/java/org/sonar/colorizer/LiteralTokenizer.java +++ b/sonar-colorizer/src/main/java/org/sonar/colorizer/LiteralTokenizer.java @@ -61,6 +61,7 @@ public class LiteralTokenizer extends Tokenizer { literalValue = new StringBuilder(); } + @Override public boolean match(int endFlag) { literalValue.append((char) endFlag); return code.lastChar()==firstChar && evenNumberOfBackSlashBeforeDelimiter() && literalValue.length()>1; diff --git a/sonar-colorizer/src/main/java/org/sonar/colorizer/MultilinesDocTokenizer.java b/sonar-colorizer/src/main/java/org/sonar/colorizer/MultilinesDocTokenizer.java index 005d52a3263..1b78f3fa123 100644 --- a/sonar-colorizer/src/main/java/org/sonar/colorizer/MultilinesDocTokenizer.java +++ b/sonar-colorizer/src/main/java/org/sonar/colorizer/MultilinesDocTokenizer.java @@ -78,6 +78,7 @@ public class MultilinesDocTokenizer extends Tokenizer { this.codeBuilder = codeBuilder; } + @Override public boolean match(int endFlag) { commentSize++; if (commentSize >= endToken.length + startToken.length || (commentSize >= endToken.length && isCommentStartedOnPreviousLine(codeBuilder))) { -- cgit v1.2.3