1 /*
2 * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
1110 if (stream != NULL) {
1111 break;
1112 }
1113 e = e->next();
1114 ++classpath_index;
1115 }
1116 }
1117
1118 if (stream != NULL) {
1119 // class file found, parse it
1120 ClassFileParser parser(stream);
1121 ClassLoaderData* loader_data = ClassLoaderData::the_null_class_loader_data();
1122 Handle protection_domain;
1123 TempNewSymbol parsed_name = NULL;
1124 instanceKlassHandle result = parser.parseClassFile(h_name,
1125 loader_data,
1126 protection_domain,
1127 parsed_name,
1128 context.should_verify(classpath_index),
1129 THREAD);
1130 if (HAS_PENDING_EXCEPTION) {
1131 ResourceMark rm;
1132 if (DumpSharedSpaces) {
1133 tty->print_cr("Preload Error: Failed to load %s", class_name);
1134 }
1135 return h;
1136 }
1137 h = context.record_result(classpath_index, e, result, THREAD);
1138 } else {
1139 if (DumpSharedSpaces) {
1140 tty->print_cr("Preload Warning: Cannot find %s", class_name);
1141 }
1142 }
1143
1144 return h;
1145 }
1146
1147
1148 void ClassLoader::create_package_info_table(HashtableBucket<mtClass> *t, int length,
1149 int number_of_entries) {
|
1 /*
2 * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
1110 if (stream != NULL) {
1111 break;
1112 }
1113 e = e->next();
1114 ++classpath_index;
1115 }
1116 }
1117
1118 if (stream != NULL) {
1119 // class file found, parse it
1120 ClassFileParser parser(stream);
1121 ClassLoaderData* loader_data = ClassLoaderData::the_null_class_loader_data();
1122 Handle protection_domain;
1123 TempNewSymbol parsed_name = NULL;
1124 instanceKlassHandle result = parser.parseClassFile(h_name,
1125 loader_data,
1126 protection_domain,
1127 parsed_name,
1128 context.should_verify(classpath_index),
1129 THREAD);
1130
1131 TRACE_KLASS_CREATION(result, parser, THREAD);
1132 if (HAS_PENDING_EXCEPTION) {
1133 ResourceMark rm;
1134 if (DumpSharedSpaces) {
1135 tty->print_cr("Preload Error: Failed to load %s", class_name);
1136 }
1137 return h;
1138 }
1139 h = context.record_result(classpath_index, e, result, THREAD);
1140 } else {
1141 if (DumpSharedSpaces) {
1142 tty->print_cr("Preload Warning: Cannot find %s", class_name);
1143 }
1144 }
1145
1146 return h;
1147 }
1148
1149
1150 void ClassLoader::create_package_info_table(HashtableBucket<mtClass> *t, int length,
1151 int number_of_entries) {
|