How to avoid Eclipse importing a class when putting the class name in the comments, so that checkstyle does not complain later?

后端 未结 4 952
花落未央
花落未央 2021-02-12 22:43

Sometimes I put the class name in the comments of methods or class just for referencing. But eclipse does the import automatically and leaves an import statement in the file whi

4条回答
  •  梦毁少年i
    2021-02-12 23:13

    People don't agree whether this is a bug or not. Javadoc needs the imports to create appropriate links. I'd say checkstyle should provide an option (and Eclipse maybe too) to change the warning.

    There are two relevant bug reports:

    • eclipse
    • checkstyle (now fixed)

    Update: The mentioned bug has been fixed in checkstyle. You know have the option to configure the behavior.

提交回复
热议问题