diff options
Diffstat (limited to 'src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/fallthrough/InputFallThrough.java')
-rw-r--r-- | src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/fallthrough/InputFallThrough.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/fallthrough/InputFallThrough.java b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/fallthrough/InputFallThrough.java index 4486bbd03..a3c745e55 100644 --- a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/fallthrough/InputFallThrough.java +++ b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/fallthrough/InputFallThrough.java @@ -521,4 +521,30 @@ public class InputFallThrough public void close() throws Exception { } } + + void synchronizedStatement() { + switch (hashCode()) { + case 1: + synchronized (this) { + break; + } + case 2: + // synchronized nested in if + if (true) { + synchronized (this) { + break; + } + } else { + synchronized (this) { + break; + } + } + case 3: + synchronized (this) { + } + // fallthru + default: + break; + } + } } |