[jboss-cvs] JBossAS SVN: r82215 - in projects/ejb3/trunk/common: src/main/java/org/jboss/ejb3/common/lang and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Dec 10 20:19:43 EST 2008
Author: ALRubinger
Date: 2008-12-10 20:19:43 -0500 (Wed, 10 Dec 2008)
New Revision: 82215
Modified:
projects/ejb3/trunk/common/jboss-ejb3-common-client.xml
projects/ejb3/trunk/common/pom.xml
projects/ejb3/trunk/common/src/main/java/org/jboss/ejb3/common/lang/SecurityActions.java
projects/ejb3/trunk/common/src/main/java/org/jboss/ejb3/common/lang/SerializableMethod.java
Log:
[EJBTHREE-1618] Secure access to get TCL in SerializableMethod
Modified: projects/ejb3/trunk/common/jboss-ejb3-common-client.xml
===================================================================
--- projects/ejb3/trunk/common/jboss-ejb3-common-client.xml 2008-12-11 01:18:54 UTC (rev 82214)
+++ projects/ejb3/trunk/common/jboss-ejb3-common-client.xml 2008-12-11 01:19:43 UTC (rev 82215)
@@ -17,6 +17,7 @@
<outputDirectory></outputDirectory>
<includes>
<include>org/jboss/ejb3/common/lang/SerializableMethod.class</include>
+ <include>org/jboss/ejb3/common/lang/SecurityActions*.class</include>
<include>org/jboss/ejb3/common/proxy/**</include>
<include>org/jboss/ejb3/common/registrar/spi/**</include>
<include>org/jboss/ejb3/common/string/StringUtils.class</include>
Modified: projects/ejb3/trunk/common/pom.xml
===================================================================
--- projects/ejb3/trunk/common/pom.xml 2008-12-11 01:18:54 UTC (rev 82214)
+++ projects/ejb3/trunk/common/pom.xml 2008-12-11 01:19:43 UTC (rev 82215)
@@ -21,7 +21,7 @@
</description>
<url>http://www.jboss.org/jbossejb3/</url>
- <!-- Build Configuration -->
+ <!-- Build Configuration -->
<build>
<plugins>
Modified: projects/ejb3/trunk/common/src/main/java/org/jboss/ejb3/common/lang/SecurityActions.java
===================================================================
--- projects/ejb3/trunk/common/src/main/java/org/jboss/ejb3/common/lang/SecurityActions.java 2008-12-11 01:18:54 UTC (rev 82214)
+++ projects/ejb3/trunk/common/src/main/java/org/jboss/ejb3/common/lang/SecurityActions.java 2008-12-11 01:19:43 UTC (rev 82215)
@@ -42,5 +42,16 @@
}
});
}
+
+ static ClassLoader getThreadContextClassLoader()
+ {
+ return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>()
+ {
+ public ClassLoader run()
+ {
+ return Thread.currentThread().getContextClassLoader();
+ }
+ });
+ }
}
\ No newline at end of file
Modified: projects/ejb3/trunk/common/src/main/java/org/jboss/ejb3/common/lang/SerializableMethod.java
===================================================================
--- projects/ejb3/trunk/common/src/main/java/org/jboss/ejb3/common/lang/SerializableMethod.java 2008-12-11 01:18:54 UTC (rev 82214)
+++ projects/ejb3/trunk/common/src/main/java/org/jboss/ejb3/common/lang/SerializableMethod.java 2008-12-11 01:19:43 UTC (rev 82215)
@@ -216,7 +216,7 @@
*/
public Method toMethod()
{
- return this.toMethod(Thread.currentThread().getContextClassLoader());
+ return this.toMethod(SecurityActions.getThreadContextClassLoader());
}
/**
More information about the jboss-cvs-commits
mailing list