Community
Participate
Working Groups
Build ID: I20070809-1105 Steps To Reproduce: 1. Copy the code below 2. Enable the Java warning "Empty Statement" 3. The compiler gives a warning for an empty class More information: ============================== public class EmptyClass { // Warning: Empty block should be documented } ==============================
The exact name of the preference is "Undocumented empty block". This is exactly what the warning tells you: the block defining the class body is empty and it is undocumented.
(In reply to comment #1) > The exact name of the preference is "Undocumented empty block". This is exactly > what the warning tells you: the block defining the class body is empty and it > is undocumented. Ok but if i add a javadoc to the class, i still get the warning. ========================== /** * Dummy javadoc. */ public class EmptyClass { } ========================== To get rid of the warning, i need to add a dummy javadoc IN the class: ============================= public class EmptyClass { /** Dummy javadoc*/ } ============================= I think it's kind of weird...
Any comment added inside the block removes the warning, not only a javadoc one, for example: public class EmptyClass { // this class is intentionally empty } Verified for 3.4 M2 using build I20070919-0010.