8170987: Module system implementation refresh (12/2016)

Co-authored-by: Serguei Spitsyn <serguei.spitsyn@oracle.com>
Reviewed-by: lfoltan, coleenp, mchung
This commit is contained in:
Harold Seigel 2016-12-16 05:46:52 +00:00 committed by Alan Bateman
parent 0c8c151515
commit 94c51468b8
6 changed files with 46 additions and 51 deletions

View file

@ -4684,16 +4684,7 @@ bool ClassFileParser::verify_unqualified_name(const char* name,
for (const char* p = name; p != name + length;) {
jchar ch = *p;
if (ch < 128) {
if (ch == '.') {
// permit '.' in module names unless it's the first char, or
// preceding char is also a '.', or last char is a '.'.
if ((type != ClassFileParser::LegalModule) ||
(p == name) || (*(p-1) == '.') ||
(p == name + length - 1)) {
return false;
}
}
if (ch == ';' || ch == '[' ) {
if (ch == '.' || ch == ';' || ch == '[' ) {
return false; // do not permit '.', ';', or '['
}
if (ch == '/') {