codestyle; put javadoc before or after annotation?

前端 未结 5 1944
误落风尘
误落风尘 2020-12-07 19:17

I know that it isn\'t the most vital of issues, but I just realised that I can put the javadoc comment block before or after the annotation. What would we want to adopt as a

5条回答
  •  一向
    一向 (楼主)
    2020-12-07 20:13

    I agree with all of the above. It may be helpful to others that IntelliJ (Idea)'s code style templates fail both falsely positive (when @throws is specified correctly, it warns) and falsely negative (when @throws is not specified, but should be) when using RestEasy style annotations. I put my javadocs above everything else, then annotations, then code.

    See the bug report here: https://youtrack.jetbrains.com/issue/IDEA-220520

提交回复
热议问题