import org.sonar.batch.highlighting.SyntaxHighlightingData;
import org.sonar.colorizer.Tokenizer;
+import javax.annotation.CheckForNull;
+
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
this(Lists.<CodeColorizerFormat>newArrayList());
}
+ @CheckForNull
public SyntaxHighlightingData toSyntaxHighlighting(File file, String encoding, String language) {
CodeColorizerFormat format = byLang.get(language);
List<Tokenizer> tokenizers;
if (format == null) {
- tokenizers = null;
+ return null;
} else {
tokenizers = format.getTokenizers();
}