hotspot/src/share/vm/classfile/classLoader.cpp
changeset 41741 2f5b8bbcb18c
parent 41715 296ff044b943
child 42634 7459867ebf98
--- a/hotspot/src/share/vm/classfile/classLoader.cpp	Tue Oct 18 17:38:17 2016 -0400
+++ b/hotspot/src/share/vm/classfile/classLoader.cpp	Tue Oct 18 16:15:03 2016 -0700
@@ -945,11 +945,11 @@
 }
 
 // returns true if entry already on class path
-bool ClassLoader::contains_entry(ClassPathEntry *entry) {
+bool ClassLoader::contains_append_entry(const char* name) {
   ClassPathEntry* e = _first_append_entry;
   while (e != NULL) {
     // assume zip entries have been canonicalized
-    if (strcmp(entry->name(), e->name()) == 0) {
+    if (strcmp(name, e->name()) == 0) {
       return true;
     }
     e = e->next();
@@ -991,7 +991,7 @@
 
     // Do not reorder the bootclasspath which would break get_system_package().
     // Add new entry to linked list
-    if (!check_for_duplicates || !contains_entry(new_entry)) {
+    if (!check_for_duplicates || !contains_append_entry(new_entry->name())) {
       ClassLoaderExt::add_class_path_entry(path, check_for_duplicates, new_entry);
     }
     return true;