8198447: Remove ClassLoaderExt::check().
authorjiangli
Mon, 05 Mar 2018 14:24:45 -0500
changeset 49341 4ad0085ad6d2
parent 49340 4e82736053ae
child 49342 9597f957122e
8198447: Remove ClassLoaderExt::check(). Summary: ClassLoaderExt::check() is no longer needed, remove. Reviewed-by: lfoltan, ccheung
src/hotspot/share/classfile/classLoader.cpp
src/hotspot/share/classfile/classLoaderExt.cpp
src/hotspot/share/classfile/classLoaderExt.hpp
--- a/src/hotspot/share/classfile/classLoader.cpp	Mon Mar 05 10:29:23 2018 -0500
+++ b/src/hotspot/share/classfile/classLoader.cpp	Mon Mar 05 14:24:45 2018 -0500
@@ -1457,9 +1457,6 @@
     if (has_jrt_entry()) {
       e = _jrt_entry;
       stream = _jrt_entry->open_stream(file_name, CHECK_NULL);
-      if (!context.check(stream, classpath_index)) {
-        return NULL;
-      }
     } else {
       // Exploded build - attempt to locate class in its defining module's location.
       assert(_exploded_entries != NULL, "No exploded build entries present");
@@ -1478,9 +1475,6 @@
     e = _first_append_entry;
     while (e != NULL) {
       stream = e->open_stream(file_name, CHECK_NULL);
-      if (!context.check(stream, classpath_index)) {
-        return NULL;
-      }
       if (NULL != stream) {
         break;
       }
--- a/src/hotspot/share/classfile/classLoaderExt.cpp	Mon Mar 05 10:29:23 2018 -0500
+++ b/src/hotspot/share/classfile/classLoaderExt.cpp	Mon Mar 05 14:24:45 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -197,28 +197,6 @@
 
 Thread* ClassLoaderExt::Context::_dump_thread = NULL;
 
-bool ClassLoaderExt::check(ClassLoaderExt::Context *context,
-                           const ClassFileStream* stream,
-                           const int classpath_index) {
-  if (stream != NULL) {
-    // Ignore any App classes from signed JAR file during CDS archiving
-    // dumping
-    if (DumpSharedSpaces &&
-        SharedClassUtil::is_classpath_entry_signed(classpath_index) &&
-        classpath_index >= _app_paths_start_index) {
-      tty->print_cr("Preload Warning: Skipping %s from signed JAR",
-                    context->class_name());
-      return false;
-    }
-    if (classpath_index >= _app_paths_start_index) {
-      _has_app_classes = true;
-      _has_platform_classes = true;
-    }
-  }
-
-  return true;
-}
-
 void ClassLoaderExt::record_result(ClassLoaderExt::Context *context,
                                    Symbol* class_name,
                                    const s2 classpath_index,
--- a/src/hotspot/share/classfile/classLoaderExt.hpp	Mon Mar 05 10:29:23 2018 -0500
+++ b/src/hotspot/share/classfile/classLoaderExt.hpp	Mon Mar 05 14:24:45 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -65,11 +65,6 @@
 #endif
     }
 
-    bool check(const ClassFileStream* stream, const int classpath_index) {
-      CDS_ONLY(return ClassLoaderExt::check(this, stream, classpath_index);)
-      NOT_CDS(return true;)
-    }
-
     bool should_verify(int classpath_index) {
       CDS_ONLY(return (classpath_index >= _app_paths_start_index);)
       NOT_CDS(return false;)
@@ -156,10 +151,6 @@
     return _has_app_classes || _has_platform_classes;
   }
 
-  static bool check(class ClassLoaderExt::Context *context,
-                    const ClassFileStream* stream,
-                    const int classpath_index);
-
   static void record_result(class ClassLoaderExt::Context *context,
                             Symbol* class_name,
                             const s2 classpath_index,