JDK-4147755 : (thread) Thread.setContextClassLoader should create permission only once
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 1.2.0,7
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • OS: generic,solaris_10
  • CPU: generic,sparc
  • Submitted: 1998-06-11
  • Updated: 2005-08-26
  • Resolved: 2005-08-26
Related Reports
Duplicate :  
Description
Thread.setContextClassLoader creates a new RuntimePermission every time it is called.  This method gets called on every RMI call.  The permission should only be created once, and kept in a static.

Comments
EVALUATION This is a straightforward performance tweak. joshua.bloch@Eng 1998-06-25 There was an assumption of value here that wasn't born out by the data: the savings is less than 1% of the overall cost of invoking the mutator. For typical applications the actual benefit would be negligible.
11-06-2004

PUBLIC COMMENTS Thread.setContextClassLoader creates a new RuntimePermission every time it is called. This method gets called on every RMI call. The permission should only be created once, and kept in a static.
10-06-2004