MCPcopy Create free account
hub / github.com/apache/tomcat / validate

Method validate

java/jakarta/servlet/http/Cookie.java:533–541  ·  view source on GitHub ↗
(String name)

Source from the content-addressed store, hash-verified

531 }
532
533 void validate(String name) {
534 if (name == null || name.isEmpty()) {
535 throw new IllegalArgumentException(lStrings.getString("err.cookie_name_blank"));
536 }
537 if (!isToken(name)) {
538 String errMsg = lStrings.getString("err.cookie_name_is_token");
539 throw new IllegalArgumentException(MessageFormat.format(errMsg, name));
540 }
541 }
542
543 boolean isToken(String possibleToken) {
544 int len = possibleToken.length();

Callers

nothing calls this directly

Calls 4

isTokenMethod · 0.95
getStringMethod · 0.65
formatMethod · 0.65
isEmptyMethod · 0.45

Tested by

no test coverage detected