JDK-4442373 : MarshalInputStream cannot resolve primitive classes
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.rmi
  • Affected Version: 1.4.0
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2001-04-12
  • Updated: 2001-07-26
  • Resolved: 2001-06-13
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.4.0 beta2Fixed
Related Reports
Relates :  
Description
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.


Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: merlin-beta2 FIXED IN: merlin-beta2 INTEGRATED IN: merlin-beta2 VERIFIED IN: merlin-beta2
14-06-2004

EVALUATION Will fix for merlin beta-refresh. michael.warres@east 2001-04-12 By leveraging ObjectInputStream's ability to resolve primitive classes RMI's marshalling input stream RMI is now able to resolve this type of class. If MarshalInputStream catches a ClassNotFoundException while trying to resolve a primitive class it delegates to ObjectInputStream to resolve the class. ###@###.### 2001-08-17
17-08-2001