mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8140594: Various minor code improvements (compiler)
Various minor code improvements (compiler) Reviewed-by: thartmann, kvn
This commit is contained in:
parent
96c4dc3210
commit
1e4b00b1dc
19 changed files with 77 additions and 56 deletions
|
@ -1160,10 +1160,10 @@ Klass* SystemDictionary::resolve_from_stream(Symbol* class_name,
|
|||
while ((index = strchr(name, '/')) != NULL) {
|
||||
*index = '.'; // replace '/' with '.' in package name
|
||||
}
|
||||
const char* fmt = "Prohibited package name: %s";
|
||||
size_t len = strlen(fmt) + strlen(name);
|
||||
const char* msg_text = "Prohibited package name: ";
|
||||
size_t len = strlen(msg_text) + strlen(name) + 1;
|
||||
char* message = NEW_RESOURCE_ARRAY(char, len);
|
||||
jio_snprintf(message, len, fmt, name);
|
||||
jio_snprintf(message, len, "%s%s", msg_text, name);
|
||||
Exceptions::_throw_msg(THREAD_AND_LOCATION,
|
||||
vmSymbols::java_lang_SecurityException(), message);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue