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

MarshalInputStream cannot resolve primitive classes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.4.0
    • core-libs
    • None
    • beta2
    • generic
    • generic
    • Verified

      Although the fix in merlin for 4171142 ("Deserialization fails for Class object
      of primitive type") allows ObjectInputStream.resolveClass() to properly
      resolve primitive class types, MarshalInputStream.resolveClass() still fails
      to resolve them, meaning that primitive Class objects cannot be sent over
      RMI calls or stored in MarshalledObjects. The following simple test case
      demonstrates the problem:

         public class Foo {
             public static void main(String[] args) throws Exception {
                 new java.rmi.MarshalledObject(int.class).get();
             }
         }

      Either MarshalInputStream.resolveClass() should be modified to handle
      primitive class cases, or else ObjectInputStream should be changed to
      check for primitive class resolution failures if resolveClass() throws
      a ClassNotFoundException.

            mwarressunw Michael Warres (Inactive)
            mwarressunw Michael Warres (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: