3 ms·
I have a single gripe with how Java handles enums. They would be safer to work with if it was invalid to write a switch statement with a missing case and no de
by bhickey 13y ago
I have a single gripe with how Java handles enums.
They would be safer to work with if it was invalid to write a switch statement with a missing case and no default. I see a lot of code like:
switch (foo) {
case Bar: ...
case Baz: ...
default: throw new IllegalArgumentException();
}
- Too 13y agoI don't know the state of lint-tools for java but for C and C# most lint-tools do this check.