Add default block in DefaultHttpHeaders (#11329)
Motivation: Every switch block should also have a default case. Modification: Add default block in DefaultHttpHeaders to ensure we not fall-through by mistake Result: Cleanup Signed-off-by: xingrufei <xingrufei@sogou-inc.com>
This commit is contained in:
parent
83290c5a4b
commit
cfe631ad05
@ -475,6 +475,8 @@ public class DefaultHttpHeaders extends HttpHeaders {
|
|||||||
throw new IllegalArgumentException("a header value contains a prohibited character '\\v': " + seq);
|
throw new IllegalArgumentException("a header value contains a prohibited character '\\v': " + seq);
|
||||||
case '\f':
|
case '\f':
|
||||||
throw new IllegalArgumentException("a header value contains a prohibited character '\\f': " + seq);
|
throw new IllegalArgumentException("a header value contains a prohibited character '\\f': " + seq);
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -486,6 +488,8 @@ public class DefaultHttpHeaders extends HttpHeaders {
|
|||||||
return 1;
|
return 1;
|
||||||
case '\n':
|
case '\n':
|
||||||
return 2;
|
return 2;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
@ -501,6 +505,8 @@ public class DefaultHttpHeaders extends HttpHeaders {
|
|||||||
default:
|
default:
|
||||||
throw new IllegalArgumentException("only ' ' and '\\t' are allowed after '\\n': " + seq);
|
throw new IllegalArgumentException("only ' ' and '\\t' are allowed after '\\n': " + seq);
|
||||||
}
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user