[jboss-cvs] JBossAS SVN: r95072 - projects/annotations/trunk/core/src/main/java/org/jboss/papaki/javalangreflect.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Sun Oct 18 07:37:53 EDT 2009
Author: alesj
Date: 2009-10-18 07:37:53 -0400 (Sun, 18 Oct 2009)
New Revision: 95072
Modified:
projects/annotations/trunk/core/src/main/java/org/jboss/papaki/javalangreflect/SecurityActions.java
Log:
Use generics. ;-)
Modified: projects/annotations/trunk/core/src/main/java/org/jboss/papaki/javalangreflect/SecurityActions.java
===================================================================
--- projects/annotations/trunk/core/src/main/java/org/jboss/papaki/javalangreflect/SecurityActions.java 2009-10-18 11:31:56 UTC (rev 95071)
+++ projects/annotations/trunk/core/src/main/java/org/jboss/papaki/javalangreflect/SecurityActions.java 2009-10-18 11:37:53 UTC (rev 95072)
@@ -47,9 +47,9 @@
*/
static ClassLoader getThreadContextClassLoader()
{
- return (ClassLoader)AccessController.doPrivileged(new PrivilegedAction<Object>()
+ return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>()
{
- public Object run()
+ public ClassLoader run()
{
return Thread.currentThread().getContextClassLoader();
}
@@ -78,9 +78,9 @@
*/
static Properties getSystemProperties()
{
- return (Properties)AccessController.doPrivileged(new PrivilegedAction<Object>()
+ return AccessController.doPrivileged(new PrivilegedAction<Properties>()
{
- public Object run()
+ public Properties run()
{
return System.getProperties();
}
@@ -94,9 +94,9 @@
*/
static String getSystemProperty(final String name)
{
- return (String)AccessController.doPrivileged(new PrivilegedAction<Object>()
+ return AccessController.doPrivileged(new PrivilegedAction<String>()
{
- public Object run()
+ public String run()
{
return System.getProperty(name);
}
@@ -128,9 +128,9 @@
*/
static URLClassLoader createURLClassLoader(final URL[] urls, final ClassLoader parent)
{
- return (URLClassLoader)AccessController.doPrivileged(new PrivilegedAction<Object>()
+ return AccessController.doPrivileged(new PrivilegedAction<URLClassLoader>()
{
- public Object run()
+ public URLClassLoader run()
{
return new URLClassLoader(urls, parent);
}
More information about the jboss-cvs-commits
mailing list