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

(proxy) generated code should use static methods, not constructors, for boxing

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 5.0
    • 5.0
    • core-libs
    • None
    • tiger
    • sparc
    • solaris_8
    • Verified

      The current java.lang.reflect.Proxy implementation generates code that always invokes constructors of the java.lang primitive wrapper classes to box primitive values (to pass to InvocationHandler.invoke). Even before Tiger, this is clearly less then ideal for booleans. In Tiger, all of the java.lang primitive wrapper classes will have static factory methods for boxing values (to go along with language-level boxing support-- see 4887004) that might be implemented more efficiently than by constructing a new wrapper instance on every invocation. The j.j.r.Proxy implementation should generate code that uses these static factory methods instead of constructors, where appropriate.

            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: