< prev index next >

src/share/vm/classfile/classLoader.cpp

Print this page
rev 6864 : 8061651: Interface to the Lookup Index Cache to improve URLClassPath search time
Summary: Implemented the interface in sun.misc.URLClassPath and corresponding JVM_XXX APIs
Reviewed-by: mchung, acorn, jiangli, dholmes

*** 608,618 **** delete checker; return result; } #endif ! void ClassLoader::setup_search_path(const char *class_path) { int offset = 0; int len = (int)strlen(class_path); int end = 0; // Iterate over class path entries --- 608,618 ---- delete checker; return result; } #endif ! void ClassLoader::setup_search_path(const char *class_path, bool canonicalize) { int offset = 0; int len = (int)strlen(class_path); int end = 0; // Iterate over class path entries
*** 623,633 **** EXCEPTION_MARK; ResourceMark rm(THREAD); char* path = NEW_RESOURCE_ARRAY(char, end - start + 1); strncpy(path, &class_path[start], end - start); path[end - start] = '\0'; ! update_class_path_entry_list(path, false); #if INCLUDE_CDS if (DumpSharedSpaces) { check_shared_classpath(path); } #endif --- 623,639 ---- EXCEPTION_MARK; ResourceMark rm(THREAD); char* path = NEW_RESOURCE_ARRAY(char, end - start + 1); strncpy(path, &class_path[start], end - start); path[end - start] = '\0'; ! if (canonicalize) { ! char* canonical_path = NEW_RESOURCE_ARRAY(char, JVM_MAXPATHLEN + 1); ! if (get_canonical_path(path, canonical_path, JVM_MAXPATHLEN)) { ! path = canonical_path; ! } ! } ! update_class_path_entry_list(path, /*check_for_duplicates=*/canonicalize); #if INCLUDE_CDS if (DumpSharedSpaces) { check_shared_classpath(path); } #endif
< prev index next >