[jboss-jira] [JBoss JIRA] Commented: (JASSIST-75) SerializedProxy should use TCCL in readResolve
David Lloyd (JIRA)
jira-events at lists.jboss.org
Thu Mar 26 10:17:23 EDT 2009
[ https://jira.jboss.org/jira/browse/JASSIST-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12459204#action_12459204 ]
David Lloyd commented on JASSIST-75:
------------------------------------
A couple comments - first, you should probably use "Class.forName(name, true, loader)" rather than "loader.loadClass(name)". Second, getting the TCCL is a possibly privileged operation so if there's a security manager present, you should be getting it in a doPrivileged block.
> SerializedProxy should use TCCL in readResolve
> ----------------------------------------------
>
> Key: JASSIST-75
> URL: https://jira.jboss.org/jira/browse/JASSIST-75
> Project: Javassist
> Issue Type: Bug
> Reporter: Ales Justin
> Assignee: Shigeru Chiba
> Fix For: 3.10.0.GA
>
> Attachments: TCCL_usage_.patch
>
>
> When loading classes in SerializedProxy::readResolve
> we should use TCCL instaed of caller CL.
> e.g.
> ClassLoader cl = Thread.currentThread().getContextClassLoader();
> cl.loadClass(name);
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list