8000 may colon (:) be valid char as spring:session:sessions · Issue #201 · cache2k/cache2k · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
may colon (:) be valid char as spring:session:sessions #201
Open
@trydofor

Description

@trydofor

in spring-session project, spring:session:sessions is used as default name.
so may : be valid in cache name pattern.

as the docs says

For maximum compatibility cache names should only
be composed with the characters [-_.a-zA-Z0-9].
The characters {}|^&=";:<>*?/ are not allowed in a cache name.

and the code impl

public static void checkName(String s) {
for (char c : s.toCharArray()) {
if (c == '.' ||
c == '-' ||
c == '~' ||
c == ',' ||
c == '@' ||
c == ' ' ||
c == '(' ||
c == ')' ||
c == '+' ||
c == '!' ||
c == '\'' ||
c == '%' ||
c == '#') {
continue;
}
if (c < 32 || c >= 127 || !Character.isJavaIdentifierPart(c)) {
throw new IllegalArgumentException(
"Cache name contains illegal character: '" + c + "', name=\"" + s + "\"");
}
}
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0