aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-colorizer
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2013-08-17 00:38:28 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2013-08-17 00:38:28 +0200
commit9fe28c5e6f56bd44633283d8b8cb01c5791b7d2a (patch)
treeff583f876ec12d54642b59f182793d6e195774b6 /sonar-colorizer
parenta48f3652c54ac1b9444ff740ab020d035fba293d (diff)
downloadsonarqube-9fe28c5e6f56bd44633283d8b8cb01c5791b7d2a.tar.gz
sonarqube-9fe28c5e6f56bd44633283d8b8cb01c5791b7d2a.zip
Fix some quality flaws
Diffstat (limited to 'sonar-colorizer')
-rw-r--r--sonar-colorizer/src/main/java/org/sonar/colorizer/CodeColorizer.java2
-rw-r--r--sonar-colorizer/src/main/java/org/sonar/colorizer/LiteralTokenizer.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/sonar-colorizer/src/main/java/org/sonar/colorizer/CodeColorizer.java b/sonar-colorizer/src/main/java/org/sonar/colorizer/CodeColorizer.java
index f7c651d1bfa..d64bba69530 100644
--- a/sonar-colorizer/src/main/java/org/sonar/colorizer/CodeColorizer.java
+++ b/sonar-colorizer/src/main/java/org/sonar/colorizer/CodeColorizer.java
@@ -39,7 +39,7 @@ public class CodeColorizer {
}
public String toHtml(Reader code, HtmlOptions options) {
- HtmlOptions opts = (options == null ? HtmlOptions.DEFAULT : options);
+ HtmlOptions opts = options == null ? HtmlOptions.DEFAULT : options;
return new HtmlRenderer(opts).render(code, tokenizers);
}
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 2ba72828e92..c230e9c21dd 100644
--- a/sonar-colorizer/src/main/java/org/sonar/colorizer/LiteralTokenizer.java
+++ b/sonar-colorizer/src/main/java/org/sonar/colorizer/LiteralTokenizer.java
@@ -63,7 +63,7 @@ public class LiteralTokenizer extends Tokenizer {
public boolean match(int endFlag) {
literalValue.append((char) endFlag);
- return (code.lastChar() == firstChar && evenNumberOfBackSlashBeforeDelimiter() && literalValue.length() > 1);
+ return code.lastChar()==firstChar && evenNumberOfBackSlashBeforeDelimiter() && literalValue.length()>1;
}
private boolean evenNumberOfBackSlashBeforeDelimiter() {