From 9fe28c5e6f56bd44633283d8b8cb01c5791b7d2a Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Sat, 17 Aug 2013 00:38:28 +0200 Subject: Fix some quality flaws --- sonar-colorizer/src/main/java/org/sonar/colorizer/CodeColorizer.java | 2 +- sonar-colorizer/src/main/java/org/sonar/colorizer/LiteralTokenizer.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'sonar-colorizer/src') 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() { -- cgit v1.2.3