hotspot/src/share/vm/classfile/classLoader.cpp
changeset 42634 7459867ebf98
parent 41741 2f5b8bbcb18c
child 42636 aafc434ba580
equal deleted inserted replaced
42632:c4f00b77b6d4 42634:7459867ebf98
   749       _patch_mod_entries->push(module_cpl);
   749       _patch_mod_entries->push(module_cpl);
   750     }
   750     }
   751   }
   751   }
   752 }
   752 }
   753 
   753 
       
   754 // Determine whether the module has been patched via the command-line
       
   755 // option --patch-module
       
   756 bool ClassLoader::is_in_patch_mod_entries(Symbol* module_name) {
       
   757   if (_patch_mod_entries != NULL && _patch_mod_entries->is_nonempty()) {
       
   758     int table_len = _patch_mod_entries->length();
       
   759     for (int i = 0; i < table_len; i++) {
       
   760       ModuleClassPathList* patch_mod = _patch_mod_entries->at(i);
       
   761       if (module_name->fast_compare(patch_mod->module_name()) == 0) {
       
   762         return true;
       
   763       }
       
   764     }
       
   765   }
       
   766   return false;
       
   767 }
       
   768 
   754 void ClassLoader::setup_search_path(const char *class_path, bool bootstrap_search) {
   769 void ClassLoader::setup_search_path(const char *class_path, bool bootstrap_search) {
   755   int len = (int)strlen(class_path);
   770   int len = (int)strlen(class_path);
   756   int end = 0;
   771   int end = 0;
   757   bool set_base_piece = bootstrap_search;
   772   bool set_base_piece = bootstrap_search;
   758 
   773 
  1762   ClassLoader::initialize();
  1777   ClassLoader::initialize();
  1763 }
  1778 }
  1764 
  1779 
  1765 // Complete the ClassPathEntry setup for the boot loader
  1780 // Complete the ClassPathEntry setup for the boot loader
  1766 void ClassLoader::classLoader_init2(TRAPS) {
  1781 void ClassLoader::classLoader_init2(TRAPS) {
  1767   // Create the moduleEntry for java.base
       
  1768   create_javabase();
       
  1769 
       
  1770   // Setup the list of module/path pairs for --patch-module processing
  1782   // Setup the list of module/path pairs for --patch-module processing
  1771   // This must be done after the SymbolTable is created in order
  1783   // This must be done after the SymbolTable is created in order
  1772   // to use fast_compare on module names instead of a string compare.
  1784   // to use fast_compare on module names instead of a string compare.
  1773   if (Arguments::get_patch_mod_prefix() != NULL) {
  1785   if (Arguments::get_patch_mod_prefix() != NULL) {
  1774     setup_patch_mod_entries();
  1786     setup_patch_mod_entries();
  1775   }
  1787   }
       
  1788 
       
  1789   // Create the ModuleEntry for java.base (must occur after setup_patch_mod_entries
       
  1790   // to successfully determine if java.base has been patched)
       
  1791   create_javabase();
  1776 
  1792 
  1777   // Setup the initial java.base/path pair for the exploded build entries.
  1793   // Setup the initial java.base/path pair for the exploded build entries.
  1778   // As more modules are defined during module system initialization, more
  1794   // As more modules are defined during module system initialization, more
  1779   // entries will be added to the exploded build array.
  1795   // entries will be added to the exploded build array.
  1780   if (!has_jrt_entry()) {
  1796   if (!has_jrt_entry()) {