Menu

#385 Get error about invalid token even though it is valid

6.5.0
closed
nobody
None
1
2015-04-15
2015-03-17
No

Get this message when Checkstyle runs:

cannot initialize module TreeWalker - Token "WILDCARD_TYPE" was not found in Acceptable   
tokens list in check   
com.puppycrawl.tools.checkstyle.checks.whitespace.WhitespaceAroundCheck@2261fbd cannot    
initialize module TreeWalker - Token "WILDCARD_TYPE" was not found in Acceptable tokens 
list in check com.puppycrawl.tools.checkstyle.checks.whitespace.WhitespaceAroundCheck@2261fbd

When I go to the configuration of Whitespace Around, I see this as valid option at the very end of the list. If I remove, the option, this warning goes away, but a similar error shows up for a different check and again the token it complains about is one found at the end of the option list. I've downgraded back to 6.1.1 and now I no longer have the issue again.

Discussion

  • Lars Koedderitzsch

    Hi, it seems that indeed the WILDCARD_TYPE token has been removed from the list of acceptable tokens of the WhitespaceAround check, that is in the Checkstyle core library.

    However, I apparently missed to update the plugins own metadata concerning this, hence the plugin still offers this token, even though the underlying Checkstyle engine doesn't support it anymore.

    If you're planning on using a newer Checkstyle/Plugin version you should just remove the incriminating token from your config.

    I will fix the plugins metadata for the next version.

    Kind regards,
    Lars

     
  • David Humeniuk

    David Humeniuk - 2015-03-17

    Thanks. That makes sense.

     
  • Lars Koedderitzsch

    Fixed for next release.

     
  • Lars Koedderitzsch

    • status: open --> closed
     
  • Lars Koedderitzsch

    • Group: 6.4.0 --> 6.5.0
     
  • Lars Koedderitzsch

    Readded the token to the plugin metadata again, after it has been readded in CS 6.5

     

Log in to post a comment.