mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8153858: Clean up needed when obtaining the package name from a fully qualified class name
Consolidated and refactored code parsing fully qualified names. Includes gtest. Reviewed-by: dholmes, coleenp
This commit is contained in:
parent
b0fab9d6b7
commit
e956abefe6
9 changed files with 218 additions and 85 deletions
|
@ -444,7 +444,9 @@ class ClassLoader: AllStatic {
|
|||
static bool string_ends_with(const char* str, const char* str_to_find);
|
||||
|
||||
// obtain package name from a fully qualified class name
|
||||
static const char* package_from_name(const char* class_name);
|
||||
// *bad_class_name is set to true if there's a problem with parsing class_name, to
|
||||
// distinguish from a class_name with no package name, as both cases have a NULL return value
|
||||
static const char* package_from_name(const char* const class_name, bool* bad_class_name = NULL);
|
||||
|
||||
static bool is_jrt(const char* name) { return string_ends_with(name, MODULES_IMAGE_NAME); }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue