From b7e23e2c39e1f4ba96b2ca2bd92c3c7cf6fa93d4 Mon Sep 17 00:00:00 2001 From: skyguard1 Date: Fri, 28 May 2021 14:50:30 +0800 Subject: [PATCH] Add default block in DnsOpCode (#11328) Motivation: Every switch block should also have a default case. Modification: Add default block in DnsOpCode to ensure we not fall-through by mistake Result: Cleanup Signed-off-by: xingrufei --- .../src/main/java/io/netty/handler/codec/dns/DnsOpCode.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/codec-dns/src/main/java/io/netty/handler/codec/dns/DnsOpCode.java b/codec-dns/src/main/java/io/netty/handler/codec/dns/DnsOpCode.java index f14211a793..8316ef453d 100644 --- a/codec-dns/src/main/java/io/netty/handler/codec/dns/DnsOpCode.java +++ b/codec-dns/src/main/java/io/netty/handler/codec/dns/DnsOpCode.java @@ -65,6 +65,8 @@ public class DnsOpCode implements Comparable { return NOTIFY; case 0x05: return UPDATE; + default: + break; } return new DnsOpCode(b);