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

unmarshalling code should use static factory methods for primitive boxing

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 6
    • 5.0
    • core-libs
    • 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.

            peterjones Peter Jones (Inactive)
            peterjones Peter Jones (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: