JDK-5096177 : unmarshalling code should use static factory methods for primitive boxing
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.rmi
  • Affected Version: 5.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2004-09-02
  • Updated: 2005-09-20
  • Resolved: 2005-09-20
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.
JDK 6
6 betaFixed
Related Reports
Relates :  
Description
The current RMI implementation code that handles unmarshalling a return value according to the remote method's declared return type always invokes constructors of the java.lang primitive wrapper classes to box primitive values (to return from RemoteRef.invoke).  Even before Tiger, this is clearly less than ideal for booleans.  In Tiger, all of the java.lang primitive wrapper classes have static factory methods for boxing values (to go along with language-level support for automatic boxing) that can be more efficient (in space and time) than constructing a new wrapper instance on every invocation.  This return value unmarshalling code, in sun.rmi.server.UnicastRef.unmarshalValue, should be modified to use static factory methods instead of constructors for primitive return types.

Comments
EVALUATION Yes, this simple change seems desirable. ###@###.### 2004-09-02
02-09-2004