Author: ron.sigal(a)jboss.com
Date: 2008-04-01 23:55:07 -0400 (Tue, 01 Apr 2008)
New Revision: 3835
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/loading/CompressedClassBytes.java
Log:
JBREM-934: Put ClassLoader.getSystemClassLoader() call in AccessController.doPrivileged()
call.
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/loading/CompressedClassBytes.java
===================================================================
---
remoting2/branches/2.x/src/main/org/jboss/remoting/loading/CompressedClassBytes.java 2008-04-02
03:53:52 UTC (rev 3834)
+++
remoting2/branches/2.x/src/main/org/jboss/remoting/loading/CompressedClassBytes.java 2008-04-02
03:55:07 UTC (rev 3835)
@@ -82,7 +82,14 @@
byte buf [] = org.jboss.remoting.loading.ClassUtil.serialize(string);
CompressedClassBytes cb = new CompressedClassBytes("java.lang.String",
buf, 9);
byte b1[] = org.jboss.remoting.loading.ClassUtil.serialize(cb);
- Object obj = ClassUtil.deserialize(b1, ClassLoader.getSystemClassLoader());
+ ClassLoader classLoader = (ClassLoader) AccessController.doPrivileged( new
PrivilegedAction()
+ {
+ public Object run()
+ {
+ return ClassLoader.getSystemClassLoader();
+ }
+ });
+ Object obj = ClassUtil.deserialize(b1, classLoader);
}
catch (Throwable ex)
{
Show replies by date