openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1081743 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/SecurityUtil.java
Date Tue, 15 Mar 2011 11:57:49 GMT
Author: struberg
Date: Tue Mar 15 11:57:49 2011
New Revision: 1081743

URL: http://svn.apache.org/viewvc?rev=1081743&view=rev
Log:
OWB-545 remove now unused methods

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/SecurityUtil.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/SecurityUtil.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/SecurityUtil.java?rev=1081743&r1=1081742&r2=1081743&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/SecurityUtil.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/SecurityUtil.java
Tue Mar 15 11:57:49 2011
@@ -31,7 +31,7 @@ import java.util.Properties;
 import javassist.util.proxy.ProxyFactory;
 import org.apache.webbeans.exception.WebBeansException;
 
-/** @deprecated  use SecurityService instaed */
+/** @deprecated  use SecurityService instead */
 public class SecurityUtil
 {
 
@@ -50,7 +50,6 @@ public class SecurityUtil
     private static final PrivilegedActionGetSystemProperties SYSTEM_PROPERTY_ACTION = new
PrivilegedActionGetSystemProperties();
 
     @SuppressWarnings("unchecked")
-    /** @deprecated  use SecurityService instaed */
     public static <T> Constructor<T>[] doPrivilegedGetDeclaredConstructors(Class<T>
clazz)
     {
         Object obj = AccessController.doPrivileged(
@@ -58,16 +57,6 @@ public class SecurityUtil
         return (Constructor<T>[])obj;
     }
 
-    public static <T> Method doPrivilegedGetDeclaredMethod(Class<T> clazz, String
name, Class<?>... parameterTypes)  throws NoSuchMethodException
-    {
-        Object obj = AccessController.doPrivileged(
-                new PrivilegedActionForClass(clazz, new Object[] {name, parameterTypes},
METHOD_CLASS_GETDECLAREDMETHOD));
-        if (obj instanceof NoSuchMethodException)
-        {
-            throw (NoSuchMethodException)obj;
-        }
-        return (Method)obj;
-    }
 
     public static <T> Method[] doPrivilegedGetDeclaredMethods(Class<T> clazz)
     {
@@ -187,11 +176,6 @@ public class SecurityUtil
         return AccessController.doPrivileged(new PrivilegedActionForObjectCreation(clazz));
     }
 
-    public static void doPrivilegedSetSystemProperty(String propertyName, String value)
-    {
-        AccessController.doPrivileged(new PrivilegedActionForSetProperty(propertyName, value));
-    }
-
     public static Properties doPrivilegedGetSystemProperties()
     {
         return AccessController.doPrivileged(SYSTEM_PROPERTY_ACTION);
@@ -217,27 +201,6 @@ public class SecurityUtil
         
     }
     
-    protected static class PrivilegedActionForSetProperty implements PrivilegedAction<Object>
-    {
-        private final String propertyName;
-        
-        private final String value;
-
-        protected PrivilegedActionForSetProperty(String propertyName, String value)
-        {
-            this.propertyName = propertyName;
-            this.value = value;
-        }
-        
-        @Override
-        public String run()
-        {
-            System.setProperty(propertyName, value);
-            return null;            
-        }
-        
-    }    
-    
     protected static class PrivilegedActionGetSystemProperties implements PrivilegedAction<Properties>
     {
         



Mime
View raw message