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 GitHub
parent 7caced28c6
commit cd0203b5c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

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

View File

@ -738,6 +738,8 @@ public final class NioEventLoop extends SingleThreadEventLoop {
invokeChannelUnregistered(task, k, null);
}
break;
default:
break;
}
}
}