diff --git a/pmd-java/etc/grammar/Java.jjt b/pmd-java/etc/grammar/Java.jjt index 5d9641db03..5e00b77f4c 100644 --- a/pmd-java/etc/grammar/Java.jjt +++ b/pmd-java/etc/grammar/Java.jjt @@ -561,7 +561,7 @@ PARSER_END(JavaParserImpl) TOKEN_MGR_DECLS : { - protected List comments = new ArrayList(); + protected List comments = new ArrayList(); } /* WHITE SPACE */ @@ -587,7 +587,7 @@ SPECIAL_TOKEN : if (startOfNOPMD != -1) { suppressMap.put(matchedToken.getBeginLine(), matchedToken.getImage().substring(startOfNOPMD + suppressMarker.length())); } - comments.add(new Comment(matchedToken)); + comments.add(new JavaComment(matchedToken)); } } @@ -608,7 +608,7 @@ SPECIAL_TOKEN : SPECIAL_TOKEN : { - { comments.add(new Comment(matchedToken)); } : DEFAULT + { comments.add(new JavaComment(matchedToken)); } : DEFAULT } @@ -2612,14 +2612,14 @@ void AssertStatement() : void RUNSIGNEDSHIFT() #void: {} { - LOOKAHEAD({ JavaTokenDocument.getRealKind(getToken(1)) == RUNSIGNEDSHIFT}) + LOOKAHEAD({ JavaTokenDocumentBehavior.getRealKind(getToken(1)) == RUNSIGNEDSHIFT}) ">" ">" ">" } void RSIGNEDSHIFT() #void: {} { - LOOKAHEAD({ JavaTokenDocument.getRealKind(getToken(1)) == RSIGNEDSHIFT}) + LOOKAHEAD({ JavaTokenDocumentBehavior.getRealKind(getToken(1)) == RSIGNEDSHIFT}) ">" ">" } diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/cpd/JavaTokenizer.java b/pmd-java/src/main/java/net/sourceforge/pmd/cpd/JavaTokenizer.java index a14d75b928..5d769e12c8 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/cpd/JavaTokenizer.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/cpd/JavaTokenizer.java @@ -43,7 +43,7 @@ public class JavaTokenizer extends JavaCCTokenizer { } @Override - protected JavaccTokenDocument.TokenDocumentBehavior tokenBehavior() throws IOException { + protected JavaccTokenDocument.TokenDocumentBehavior tokenBehavior() { return InternalApiBridge.javaTokenDoc(); }