--- old/src/hotspot/share/classfile/classLoader.cpp 2018-04-24 20:03:43.443225056 -0400 +++ new/src/hotspot/share/classfile/classLoader.cpp 2018-04-24 20:03:42.143150203 -0400 @@ -270,14 +270,6 @@ // check if file exists struct stat st; if (os::stat(path, &st) == 0) { -#if INCLUDE_CDS - if (DumpSharedSpaces) { - // We have already check in ClassLoader::check_shared_classpath() that the directory is empty, so - // we should never find a file underneath it -- unless user has added a new file while we are running - // the dump, in which case let's quit! - ShouldNotReachHere(); - } -#endif // found file, open it int file_handle = os::open(path, 0, 0); if (file_handle != -1) { @@ -713,8 +705,6 @@ strncpy(path, &class_path[start], end - start); path[end - start] = '\0'; - check_shared_classpath(path); - update_class_path_entry_list(path, false, false); while (class_path[end] == os::path_separator()[0]) { @@ -757,7 +747,6 @@ } void ClassLoader::setup_module_search_path(const char* path, TRAPS) { - check_shared_classpath(path); update_module_path_entry_list(path, THREAD); } #endif // INCLUDE_CDS @@ -886,11 +875,6 @@ update_class_path_entry_list(path, false, true); } -#if INCLUDE_CDS - if (DumpSharedSpaces) { - check_shared_classpath(path); - } -#endif while (class_path[end] == os::path_separator()[0]) { end++; } @@ -1082,11 +1066,6 @@ if (entry->is_jar_file()) { ClassLoaderExt::process_jar_manifest(entry, check_for_duplicates); - } else { - if (!os::dir_is_empty(path)) { - tty->print_cr("Error: non-empty directory '%s'", path); - exit_with_path_failure("Cannot have non-empty directory in app classpaths", NULL); - } } #endif }