geronimo-xbean-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r1538850 - in /geronimo/xbean/trunk: xbean-classpath/src/main/java/org/apache/xbean/classpath/SunURLClassPath.java xbean-reflect/src/main/java/org/apache/xbean/recipe/ReflectionUtil.java
Date Tue, 05 Nov 2013 01:53:28 GMT
Author: gawor
Date: Tue Nov  5 01:53:28 2013
New Revision: 1538850

URL: http://svn.apache.org/r1538850
Log:
remove some unnecessary doPrivileged calls

Modified:
    geronimo/xbean/trunk/xbean-classpath/src/main/java/org/apache/xbean/classpath/SunURLClassPath.java
    geronimo/xbean/trunk/xbean-reflect/src/main/java/org/apache/xbean/recipe/ReflectionUtil.java

Modified: geronimo/xbean/trunk/xbean-classpath/src/main/java/org/apache/xbean/classpath/SunURLClassPath.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-classpath/src/main/java/org/apache/xbean/classpath/SunURLClassPath.java?rev=1538850&r1=1538849&r2=1538850&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-classpath/src/main/java/org/apache/xbean/classpath/SunURLClassPath.java
(original)
+++ geronimo/xbean/trunk/xbean-classpath/src/main/java/org/apache/xbean/classpath/SunURLClassPath.java
Tue Nov  5 01:53:28 2013
@@ -24,11 +24,7 @@ import java.security.PrivilegedAction;
 
 public abstract class SunURLClassPath implements ClassPath {
     public static ClassLoader getContextClassLoader() {
-        return (ClassLoader) AccessController.doPrivileged(new PrivilegedAction() {
-            public Object run() {
-                return Thread.currentThread().getContextClassLoader();
-            }
-        });
+        return Thread.currentThread().getContextClassLoader();
     }
 
     private java.lang.reflect.Field ucpField;

Modified: geronimo/xbean/trunk/xbean-reflect/src/main/java/org/apache/xbean/recipe/ReflectionUtil.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-reflect/src/main/java/org/apache/xbean/recipe/ReflectionUtil.java?rev=1538850&r1=1538849&r2=1538850&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-reflect/src/main/java/org/apache/xbean/recipe/ReflectionUtil.java
(original)
+++ geronimo/xbean/trunk/xbean-reflect/src/main/java/org/apache/xbean/recipe/ReflectionUtil.java
Tue Nov  5 01:53:28 2013
@@ -25,8 +25,6 @@ import java.lang.reflect.InvocationTarge
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
 import java.lang.reflect.Type;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
@@ -1011,12 +1009,7 @@ public final class ReflectionUtil {
     }
 
     private static void setAccessible(final AccessibleObject accessibleObject) {
-        AccessController.doPrivileged(new PrivilegedAction<Object>() {
-            public Object run() {
-                accessibleObject.setAccessible(true);
-                return null;
-            }
-        });
+        accessibleObject.setAccessible(true);
     }
 
     private static String toParameterList(Class<?>[] parameterTypes) {



Mime
View raw message