diff --git a/src/share/vm/classfile/classFileParser.cpp b/src/share/vm/classfile/classFileParser.cpp index a8de5afc5b1195c9aedf67aad296b708720d90b1..b86e9fa892d1226c20c32fd64ea231ed55625eee 100644 --- a/src/share/vm/classfile/classFileParser.cpp +++ b/src/share/vm/classfile/classFileParser.cpp @@ -4309,20 +4309,21 @@ int ClassFileParser::verify_legal_method_signature(symbolHandle name, symbolHand } -// Unqualified names may not contain the characters '.', ';', or '/'. -// Method names also may not contain the characters '<' or '>', unless or . -// Note that method names may not be or in this method. -// Because these names have been checked as special cases before calling this method -// in verify_legal_method_name. -bool ClassFileParser::verify_unqualified_name(char* name, unsigned int length, int type) { +// Unqualified names may not contain the characters '.', ';', '[', or '/'. +// Method names also may not contain the characters '<' or '>', unless +// or . Note that method names may not be or in this +// method. Because these names have been checked as special cases before +// calling this method in verify_legal_method_name. +bool ClassFileParser::verify_unqualified_name( + char* name, unsigned int length, int type) { jchar ch; for (char* p = name; p != name + length; ) { ch = *p; if (ch < 128) { p++; - if (ch == '.' || ch == ';') { - return false; // do not permit '.' or ';' + if (ch == '.' || ch == ';' || ch == '[' ) { + return false; // do not permit '.', ';', or '[' } if (type != LegalClass && ch == '/') { return false; // do not permit '/' unless it's class name