8167333: Invalid source path info might be used when creating ClassFileStream after CFLH transforms a shared classes in some cases

Use NULL as 'source' when there is no valid source path info.

Reviewed-by: iklam, dholmes, dsamersoff
This commit is contained in:
Jiangli Zhou 2016-10-10 20:50:33 -04:00
parent da45a98b46
commit 4d9fc9541d
3 changed files with 7 additions and 2 deletions

View file

@ -283,11 +283,15 @@ public:
bool validate_classpath_entry_table();
static SharedClassPathEntry* shared_classpath(int index) {
if (index < 0) {
return NULL;
}
char* p = (char*)_classpath_entry_table;
p += _classpath_entry_size * index;
return (SharedClassPathEntry*)p;
}
static const char* shared_classpath_name(int index) {
assert(index >= 0, "Sanity");
return shared_classpath(index)->_name;
}