-
Enhancement
-
Resolution: Fixed
-
P4
-
5.0
-
beta
-
generic
-
generic
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.
- relates to
-
JDK-4889342 (proxy) generated code should use static methods, not constructors, for boxing
- Closed