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

rmic should not generate code that constructs new instances of java.lang.Boolean

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 6
    • 1.4.2
    • core-libs
    • None
    • beta
    • generic
    • generic

      The current rmic implementation generates code that always constructs a new instance of java.lang.Boolean to box a boolean value (to pass to RemoteRef.invoke). The generated code would be more efficient (in space and time) if instead of this:

      new Boolean(x)

      it did this:

      (x ? Boolean.TRUE : Boolean.FALSE)

      [In the J2SE 1.4 API, java.lang.Boolean provides a static factory method, "valueOf", for this purpose, but rmic cannot in general generate stub classes that assume a 1.4 platform.]

            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: