< prev index next > src/hotspot/share/cds/classListParser.cpp
Print this page
}
ResourceMark rm;
char * source_path = os::strdup_check_oom(ClassLoader::uri_to_path(_source));
InstanceKlass* k = UnregisteredClasses::load_class(class_name, source_path, CHECK_NULL);
! if (k->local_interfaces()->length() != _interfaces->length()) {
print_specified_interfaces();
print_actual_interfaces(k);
error("The number of interfaces (%d) specified in class list does not match the class file (%d)",
! _interfaces->length(), k->local_interfaces()->length());
}
assert(k->is_shared_unregistered_class(), "must be");
bool added = SystemDictionaryShared::add_unregistered_class(THREAD, k);
}
ResourceMark rm;
char * source_path = os::strdup_check_oom(ClassLoader::uri_to_path(_source));
InstanceKlass* k = UnregisteredClasses::load_class(class_name, source_path, CHECK_NULL);
! const int actual_num_interfaces = k->local_interfaces()->length();
+ const int specified_num_interfaces = _interfaces->length(); // specified in classlist
+ int expected_num_interfaces = actual_num_interfaces;
+
+ if (specified_num_interfaces != expected_num_interfaces) {
print_specified_interfaces();
print_actual_interfaces(k);
error("The number of interfaces (%d) specified in class list does not match the class file (%d)",
! specified_num_interfaces, expected_num_interfaces);
}
assert(k->is_shared_unregistered_class(), "must be");
bool added = SystemDictionaryShared::add_unregistered_class(THREAD, k);
< prev index next >