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

Class data sharing code loses package information

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 5.0
    • Fix Version/s: 5.0
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b29
    • CPU:
      generic
    • OS:
      generic

      Description

      When a shared archive is constructed and reloaded, the PackageInfo hash table
      contained in src/share/vm/runtime/classLoader.cpp is lost. This causes
      subsequent calls to java.lang.Package.getSystemPackage() to return null where
      they used to return a Package object.

      There are a fair number of implicit assumptions in the Package code that if a
      class is loaded from a flat file (rather than from a directory) then it is
      contained in a jar file. These assumptions will be violated if the shared
      archive's file name is placed inside the PackageInfo. However, this will not
      cause the Java-level package code to break, only to throw exceptions internally
      and return null for some values. Plausibly the shared archive should record the
      package information in one of its sections, though this is not high priority
      as null is a valid return value from Class.getPackage().

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                foliversunw Fred Oliver (Inactive)
                Reporter:
                kbr Kenneth Russell (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: