Organize imports deletes imports which are reqired for javadoc

Answered

Imports for classes which are mentioned in javadoc (using @link) are being deleted when I let intellij organize the imports (Ctrl+Alt+O) which generated a code inspection error. Is this a bug or is there any way to configure this?

0
6 comments

You should use fully qualified class name in @Link annotation without importing the class via the import statement.

0
Avatar
Permanently deleted user

I was using @link and not @Link (which should be ok according to oracle documentation). With @Link everything seems to work fine. Thanks!

0
Avatar
Permanently deleted user

Still not solved: while using "@Link" does not generates an error in the IDEA, it is not recognized by the maven-javadoc-plugin, so I have to use @link in order to build my project - which generates an error in the IDEA... Is there any way to make intellij accept "@link"?

0

Hello,

{@link package.class#method} works fine on my machine. What IDE version do you use?

0
Avatar
Permanently deleted user

I have updated Intellij and invalidated the cache and the issue seems to disappear. Thanks anyway for checking.

0

Please sign in to leave a comment.