Add default handling for switch statement (#10408)

Motivation:

When a switch statement is used we should always define a `default:` so we don't introduce bugs due fall-through.

Modification:

Add missing `default:`s

Result:

Less error-prone code
This commit is contained in:
skyguard1 2020-07-16 16:54:50 +08:00 committed by Norman Maurer
parent 0d701d7c3c
commit c78c3bead0
2 changed files with 4 additions and 0 deletions

View File

@ -1055,6 +1055,8 @@ public final class PlatformDependent {
case 'g': case 'G':
maxDirectMemory *= 1024 * 1024 * 1024;
break;
default:
break;
}
break;
}

View File

@ -625,6 +625,8 @@ public final class NioHandler implements IoHandler {
invokeChannelUnregistered(task, k, null);
}
break;
default:
break;
}
}
}