Community
Participate
Working Groups
While verifying bug 265898, David highlight a problem with the initial test case when options are set as follow: [ ] Enable Javadoc comment formatting [X] Enable block comment formatting [X] Enable line comment formatting [X] Enable header comment formatting The formatter output is: /** * * @hibernate.subclass discriminator-value="address" */ public class AddressAssetVersion extends AbstractAssetVersion { } Observe the new line added inside the javadoc comment... It seems that the Javadoc comment is formatted although the option is not set!
Although it looks like, this is not a regression introduced by the fix for bug 254998 but was rather something wrong in the new comment formatter implemented in 3.4... In fact the javadoc comment is formatted but as a block comment! The new line added is the normal formatter behavior when a tag is encountered at the beginning of a line in a block comment... Fixing bug 254998 has just changed the formatter behavior as with 3.4.2. E.g. using the following options: [ ] Enable Javadoc comment formatting [X] Enable block comment formatting [ ] Enable line comment formatting [ ] Enable header comment formatting the following test case: public class Test { /** * @test bug */ int field; } was formatted in 3.4.2 as: public class Test { /* * * * * @test bug */ int field; }
Created attachment 128049 [details] Proposed patch
Released for 3.5M6 in HEAD stream.
Verified for 3.5M6 using I20090311-0100