diff options
author | David Gageot <david@gageot.net> | 2012-04-27 16:45:37 +0200 |
---|---|---|
committer | David Gageot <david@gageot.net> | 2012-04-27 16:48:58 +0200 |
commit | bd90fa7d3ec17f825cac80eebd46cf1ee0412ee9 (patch) | |
tree | 92a3ff7db9b91d9afe4684cc90a7a0cc5c3e010c /sonar-colorizer/src | |
parent | 1a6a18a5c4e73987a72b8176f398477f13074d29 (diff) | |
download | sonarqube-bd90fa7d3ec17f825cac80eebd46cf1ee0412ee9.tar.gz sonarqube-bd90fa7d3ec17f825cac80eebd46cf1ee0412ee9.zip |
Code cleaning : Remove unnecessary casts
Diffstat (limited to 'sonar-colorizer/src')
3 files changed, 4 insertions, 4 deletions
diff --git a/sonar-colorizer/src/main/java/org/sonar/colorizer/CaseInsensitiveKeywordsTokenizer.java b/sonar-colorizer/src/main/java/org/sonar/colorizer/CaseInsensitiveKeywordsTokenizer.java index 00706d9b13d..f7111c3b6e6 100644 --- a/sonar-colorizer/src/main/java/org/sonar/colorizer/CaseInsensitiveKeywordsTokenizer.java +++ b/sonar-colorizer/src/main/java/org/sonar/colorizer/CaseInsensitiveKeywordsTokenizer.java @@ -34,7 +34,7 @@ public class CaseInsensitiveKeywordsTokenizer extends KeywordsTokenizer { } public KeywordsTokenizer clone() { - KeywordsTokenizer clone = (KeywordsTokenizer) super.clone(); + KeywordsTokenizer clone = super.clone(); clone.setCaseInsensitive(true); return clone; } diff --git a/sonar-colorizer/src/main/java/org/sonar/colorizer/HtmlDecorator.java b/sonar-colorizer/src/main/java/org/sonar/colorizer/HtmlDecorator.java index c1283646513..8c830560047 100644 --- a/sonar-colorizer/src/main/java/org/sonar/colorizer/HtmlDecorator.java +++ b/sonar-colorizer/src/main/java/org/sonar/colorizer/HtmlDecorator.java @@ -32,8 +32,8 @@ public class HtmlDecorator extends Tokenizer { private HtmlOptions options; private int lineId; - private static final int LF = (int) '\n'; - private static final int CR = (int) '\r'; + private static final int LF = '\n'; + private static final int CR = '\r'; public HtmlDecorator(HtmlOptions options) { this.options = options; diff --git a/sonar-colorizer/src/test/java/org/sonar/colorizer/HtmlCodeBuilderTest.java b/sonar-colorizer/src/test/java/org/sonar/colorizer/HtmlCodeBuilderTest.java index e005260494e..1eef540e833 100644 --- a/sonar-colorizer/src/test/java/org/sonar/colorizer/HtmlCodeBuilderTest.java +++ b/sonar-colorizer/src/test/java/org/sonar/colorizer/HtmlCodeBuilderTest.java @@ -73,7 +73,7 @@ public class HtmlCodeBuilderTest { assertThat((String) builder.getVariable("foo"), is("yyy")); builder.setVariable("foo", null); - assertThat((String) builder.getVariable("foo"), nullValue()); + assertThat(builder.getVariable("foo"), nullValue()); assertThat((String) builder.getVariable("foo", "default"), is("default")); } |