Menu

#165 pretty printer removes comment from empty constructor

open
5
2004-06-06
2004-06-06
No

consider the following class:

public class JRRemoveConstructorCommentBug
{
private JRRemoveConstructorCommentBug() {
// do nothing
}

public static void doNothing() {
// do nothing
}
}

using the settings from my previous bug 967541 (pretty printer generates @param/@throws despite *.tags=""), the pretty printer turns this into:

public class JRRemoveConstructorCommentBug
{
private JRRemoveConstructorCommentBug() { }

public static void doNothing() {
// do nothing
}
}

apparently, the "// do nothing" has been removed from the constructor, while it has been preserved at the method doNothing().

(i think this is independant from pretty.settings.)

Discussion

  • Thomas Aglassinger

    test source to reproduce this bug

     
  • Thomas Aglassinger

    Logged In: YES
    user_id=421066

    oops, forgot to mention that i was using JavaStyle 2.9.19 via the ant task.

     

Log in to post a comment.

Auth0 Logo