Unneeded instance creation eliminated

This commit is contained in:
Roman Shevchenko
2010-10-28 17:56:26 +04:00
parent 05332a0732
commit 1a783e2596
2 changed files with 5 additions and 1 deletions
@@ -20,6 +20,6 @@ package com.intellij.lexer;
*/
public class JavaDocLexer extends DocCommentLexer {
public JavaDocLexer(final boolean isJdk15Enabled) {
super(new JavaDocTokenTypes(), isJdk15Enabled);
super(JavaDocTokenTypes.INSTANCE, isJdk15Enabled);
}
}
@@ -22,6 +22,10 @@ import com.intellij.psi.tree.IElementType;
* @author yole
*/
public class JavaDocTokenTypes implements DocCommentTokenTypes {
public static final DocCommentTokenTypes INSTANCE = new JavaDocTokenTypes();
private JavaDocTokenTypes() { }
public IElementType commentStart() {
return JavaDocTokenType.DOC_COMMENT_START;
}