1 /*
2 * Copyright (c) 1997, 2017, 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 *
5894 Exceptions::fthrow(
5895 THREAD_AND_LOCATION,
5896 vmSymbols::java_lang_NoClassDefFoundError(),
5897 "%s (wrong name: %s)",
5898 _class_name->as_C_string(),
5899 _requested_name != NULL ? _requested_name->as_C_string() : "NoName"
5900 );
5901 return;
5902 }
5903
5904 // if this is an anonymous class fix up its name if it's in the unnamed
5905 // package. Otherwise, throw IAE if it is in a different package than
5906 // its host class.
5907 if (_host_klass != NULL) {
5908 fix_anonymous_class_name(CHECK);
5909 }
5910
5911 // Verification prevents us from creating names with dots in them, this
5912 // asserts that that's the case.
5913 assert(is_internal_format(_class_name), "external class name format used internally");
5914
5915 if (!is_internal()) {
5916 LogTarget(Debug, class, preorder) lt;
5917 if (lt.is_enabled()){
5918 ResourceMark rm(THREAD);
5919 LogStream ls(lt);
5920 ls.print("%s", _class_name->as_klass_external_name());
5921 if (stream->source() != NULL) {
5922 ls.print(" source: %s", stream->source());
5923 }
5924 ls.cr();
5925 }
5926
5927 #if INCLUDE_CDS
5928 if (DumpLoadedClassList != NULL && stream->source() != NULL && classlist_file->is_open()) {
5929 if (!ClassLoader::has_jrt_entry()) {
5930 warning("DumpLoadedClassList and CDS are not supported in exploded build");
5931 DumpLoadedClassList = NULL;
5932 } else if (SystemDictionaryShared::is_sharing_possible(_loader_data) &&
5933 _host_klass == NULL) {
5934 // Only dump the classes that can be stored into CDS archive.
|
1 /*
2 * Copyright (c) 1997, 2018, 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 *
5894 Exceptions::fthrow(
5895 THREAD_AND_LOCATION,
5896 vmSymbols::java_lang_NoClassDefFoundError(),
5897 "%s (wrong name: %s)",
5898 _class_name->as_C_string(),
5899 _requested_name != NULL ? _requested_name->as_C_string() : "NoName"
5900 );
5901 return;
5902 }
5903
5904 // if this is an anonymous class fix up its name if it's in the unnamed
5905 // package. Otherwise, throw IAE if it is in a different package than
5906 // its host class.
5907 if (_host_klass != NULL) {
5908 fix_anonymous_class_name(CHECK);
5909 }
5910
5911 // Verification prevents us from creating names with dots in them, this
5912 // asserts that that's the case.
5913 assert(is_internal_format(_class_name), "external class name format used internally");
5914 #if INCLUDE_VBC
5915 if (SystemDictionary::is_value_based_classname(_class_name)) {
5916 _access_flags.set_is_value_based_class();
5917 }
5918 #endif
5919 if (!is_internal()) {
5920 LogTarget(Debug, class, preorder) lt;
5921 if (lt.is_enabled()){
5922 ResourceMark rm(THREAD);
5923 LogStream ls(lt);
5924 ls.print("%s", _class_name->as_klass_external_name());
5925 if (stream->source() != NULL) {
5926 ls.print(" source: %s", stream->source());
5927 }
5928 ls.cr();
5929 }
5930
5931 #if INCLUDE_CDS
5932 if (DumpLoadedClassList != NULL && stream->source() != NULL && classlist_file->is_open()) {
5933 if (!ClassLoader::has_jrt_entry()) {
5934 warning("DumpLoadedClassList and CDS are not supported in exploded build");
5935 DumpLoadedClassList = NULL;
5936 } else if (SystemDictionaryShared::is_sharing_possible(_loader_data) &&
5937 _host_klass == NULL) {
5938 // Only dump the classes that can be stored into CDS archive.
|