Skip to content

Commit 8f7736d

Browse files
enable MissingSwitchDefault check
1 parent a81d2fe commit 8f7736d

File tree

2 files changed

+11
-28
lines changed

2 files changed

+11
-28
lines changed

fishercoder_checkstyle.xml

Lines changed: 9 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
<property name="tokens"
7676
value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, LITERAL_DO, STATIC_INIT, INSTANCE_INIT"/>
7777
module>
78+
7879
7980
8081
@@ -85,10 +86,15 @@
8586
8687
8788
89+
8890
<module name="OneStatementPerLine"/>
91+
8992
93+
9094
<module name="ArrayTypeStyle"/>
91-
95+
96+
<module name="MissingSwitchDefault"/>
97+
9298
<module name="FallThrough"/>
9399
<module name="UpperEll"/>
94100
<module name="ModifierOrder"/>
@@ -173,32 +179,7 @@
173179
<property name="tokens"
174180
value="BAND, BOR, BSR, BXOR, DIV, EQUAL, GE, GT, LAND, LE, LITERAL_INSTANCEOF, LOR, LT, MINUS, MOD, NOT_EQUAL, PLUS, QUESTION, SL, SR, STAR "/>
175181
module>
176-
182+
202183
<module name="MethodName">
203184
<property name="format" value="^[a-z][a-zA-Z0-9][a-zA-Z0-9_]*$"/>
204185
<message key="name.invalidPattern"
@@ -209,6 +190,6 @@
209190
<property name="max" value="200000"/>
210191
<property name="countEmpty" value="false"/>
211192
module>
212-
193+
213194
module>
214195
module>

src/main/java/com/fishercoder/solutions/_241.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ public List diffWaysToCompute(String input) {
6060
case '*':
6161
result = a1 * a2;
6262
break;
63+
default:
64+
break;
6365
}
6466
answer.add(result);
6567
}

0 commit comments

Comments
 (0)