# HG changeset patch # User kamg # Date 1288136908 25200 # Node ID ee0d26abaad3888ae7ac6ecb157ad173bc3b4da6 # Parent 6412b3805cd6440c084fd07058db5df751f2f5fc# Parent 60ce9dade3489661f62140cf2f443ad49fabe996 Merge diff -r 60ce9dade348 -r ee0d26abaad3 src/share/vm/classfile/classFileParser.cpp --- a/src/share/vm/classfile/classFileParser.cpp Tue Oct 26 14:43:21 2010 -0400 +++ b/src/share/vm/classfile/classFileParser.cpp Tue Oct 26 16:48:28 2010 -0700 @@ -4309,20 +4309,21 @@ } -// 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