8198447: Remove ClassLoaderExt::check()

ClassLoaderExt::check() is no longer needed, remove.

Reviewed-by: lfoltan, ccheung
This commit is contained in:
Jiangli Zhou 2018-03-05 14:24:45 -05:00
parent c0bc887c36
commit 54361e56a8
3 changed files with 2 additions and 39 deletions

View File

@ -1457,9 +1457,6 @@ InstanceKlass* ClassLoader::load_class(Symbol* name, bool search_append_only, TR
if (has_jrt_entry()) {
e = _jrt_entry;
stream = _jrt_entry->open_stream(file_name, CHECK_NULL);
if (!context.check(stream, classpath_index)) {
return NULL;
}
} else {
// Exploded build - attempt to locate class in its defining module's location.
assert(_exploded_entries != NULL, "No exploded build entries present");
@ -1478,9 +1475,6 @@ InstanceKlass* ClassLoader::load_class(Symbol* name, bool search_append_only, TR
e = _first_append_entry;
while (e != NULL) {
stream = e->open_stream(file_name, CHECK_NULL);
if (!context.check(stream, classpath_index)) {
return NULL;
}
if (NULL != stream) {
break;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -197,28 +197,6 @@ void ClassLoaderExt::setup_search_paths() {
Thread* ClassLoaderExt::Context::_dump_thread = NULL;
bool ClassLoaderExt::check(ClassLoaderExt::Context *context,
const ClassFileStream* stream,
const int classpath_index) {
if (stream != NULL) {
// Ignore any App classes from signed JAR file during CDS archiving
// dumping
if (DumpSharedSpaces &&
SharedClassUtil::is_classpath_entry_signed(classpath_index) &&
classpath_index >= _app_paths_start_index) {
tty->print_cr("Preload Warning: Skipping %s from signed JAR",
context->class_name());
return false;
}
if (classpath_index >= _app_paths_start_index) {
_has_app_classes = true;
_has_platform_classes = true;
}
}
return true;
}
void ClassLoaderExt::record_result(ClassLoaderExt::Context *context,
Symbol* class_name,
const s2 classpath_index,

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -65,11 +65,6 @@ public:
#endif
}
bool check(const ClassFileStream* stream, const int classpath_index) {
CDS_ONLY(return ClassLoaderExt::check(this, stream, classpath_index);)
NOT_CDS(return true;)
}
bool should_verify(int classpath_index) {
CDS_ONLY(return (classpath_index >= _app_paths_start_index);)
NOT_CDS(return false;)
@ -156,10 +151,6 @@ public:
return _has_app_classes || _has_platform_classes;
}
static bool check(class ClassLoaderExt::Context *context,
const ClassFileStream* stream,
const int classpath_index);
static void record_result(class ClassLoaderExt::Context *context,
Symbol* class_name,
const s2 classpath_index,