diff --git a/codec-http/src/main/java/io/netty/handler/codec/http/DefaultHttpHeaders.java b/codec-http/src/main/java/io/netty/handler/codec/http/DefaultHttpHeaders.java index e39c346ce4..71bbefaf20 100644 --- a/codec-http/src/main/java/io/netty/handler/codec/http/DefaultHttpHeaders.java +++ b/codec-http/src/main/java/io/netty/handler/codec/http/DefaultHttpHeaders.java @@ -464,6 +464,8 @@ public class DefaultHttpHeaders extends HttpHeaders { throw new IllegalArgumentException("a header value contains a prohibited character '\\v': " + seq); case '\f': throw new IllegalArgumentException("a header value contains a prohibited character '\\f': " + seq); + default: + break; } } @@ -475,6 +477,8 @@ public class DefaultHttpHeaders extends HttpHeaders { return 1; case '\n': return 2; + default: + break; } break; case 1: @@ -490,6 +494,8 @@ public class DefaultHttpHeaders extends HttpHeaders { default: throw new IllegalArgumentException("only ' ' and '\\t' are allowed after '\\n': " + seq); } + default: + break; } return state; }