JDK-4889342 : (proxy) generated code should use static methods, not constructors, for boxing
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang:reflect
  • Affected Version: 5.0
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_8
  • CPU: sparc
  • Submitted: 2003-07-11
  • Updated: 2012-09-28
  • Resolved: 2003-08-18
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.
Other
5.0 tigerFixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
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.

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger FIXED IN: tiger INTEGRATED IN: tiger tiger-b16 VERIFIED IN: tiger
14-06-2004

EVALUATION Yes, this implementation enhancement seems quite desirable. ###@###.### 2003-07-18
18-07-2003