org.sonar.l10n.java.rules.squid.S00108.html Maven / Gradle / Ivy
The newest version!
Most of the time a block of code is empty when a piece of code is really missing. So such empty block must be either filled or removed.
Noncompliant Code Example
for (int i = 0; i < 42; i++){} // Empty on purpose or missing piece of code ?
Exceptions
When a block contains a comment, this block is not considered to be empty unless it is a synchronized
block. synchronized
blocks are still considered empty even with comments because they can still affect program flow.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy