Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8242290

Pointless verification in get_package_entry_by_name

    XMLWordPrintable

Details

    • Enhancement
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • 15
    • 15
    • hotspot
    • b20

    Description

      in modules.cpp:

      static PackageEntry* get_package_entry_by_name(Symbol* package,
                                                     Handle h_loader,
                                                     TRAPS) {
        if (package != NULL) {
          ResourceMark rm(THREAD);
          if (Modules::verify_package_name(package->as_C_string())) {
            PackageEntryTable* const package_entry_table =
              get_package_entry_table(h_loader);
            assert(package_entry_table != NULL, "Unexpected null package entry table");
            return package_entry_table->lookup_only(package);
          }
        }
        return NULL;
      }

      Since the package lookup would fail for any invalid package name, the call to verify_package_name appears pointless.

      Attachments

        Issue Links

          Activity

            People

              redestad Claes Redestad
              redestad Claes Redestad
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: