forked from phoedos/pmd
Skip bom
This commit is contained in:
parent
7108a166d4
commit
affb0461c9
@ -9,12 +9,13 @@ import org.apache.commons.io.input.CharSequenceReader;
|
||||
import net.sourceforge.pmd.cpd.internal.JavaCCTokenizer;
|
||||
import net.sourceforge.pmd.lang.TokenManager;
|
||||
import net.sourceforge.pmd.lang.jsp.ast.JspTokenManager;
|
||||
import net.sourceforge.pmd.util.IOUtil;
|
||||
|
||||
public class JSPTokenizer extends JavaCCTokenizer {
|
||||
|
||||
@Override
|
||||
protected TokenManager getLexerForSource(SourceCode sourceCode) {
|
||||
return new JspTokenManager(new CharSequenceReader(sourceCode.getCodeBuffer()));
|
||||
return new JspTokenManager(IOUtil.skipBOM(new CharSequenceReader(sourceCode.getCodeBuffer())));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -9,6 +9,7 @@ import org.apache.commons.io.input.CharSequenceReader;
|
||||
import net.sourceforge.pmd.cpd.internal.JavaCCTokenizer;
|
||||
import net.sourceforge.pmd.lang.TokenManager;
|
||||
import net.sourceforge.pmd.lang.vf.ast.VfTokenManager;
|
||||
import net.sourceforge.pmd.util.IOUtil;
|
||||
|
||||
/**
|
||||
* @author sergey.gorbaty
|
||||
@ -17,6 +18,6 @@ public class VfTokenizer extends JavaCCTokenizer {
|
||||
|
||||
@Override
|
||||
protected TokenManager getLexerForSource(SourceCode sourceCode) {
|
||||
return new VfTokenManager(new CharSequenceReader(sourceCode.getCodeBuffer()));
|
||||
return new VfTokenManager(IOUtil.skipBOM(new CharSequenceReader(sourceCode.getCodeBuffer())));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user