openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yingw...@apache.org
Subject svn commit: r936442 - in /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans: annotation/ component/ component/xml/ config/ decorator/ event/ inject/ inject/xml/
Date Wed, 21 Apr 2010 19:01:09 GMT
Author: yingwang
Date: Wed Apr 21 19:01:09 2010
New Revision: 936442

URL: http://svn.apache.org/viewvc?rev=936442&view=rev
Log:
[OWB-312] Part 3 in Core.

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/WebBeansAnnotation.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ProducerFieldBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/xml/XMLManagedBean.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/DefinitionUtil.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/DecoratorUtil.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/DelegateHandler.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/WebBeansDecorator.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/ObserverMethodImpl.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/InjectableConstructor.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/InjectableField.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/InjectableMethods.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/OWBInjector.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/xml/XMLInjectableConstructor.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/xml/XMLInjectableField.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/xml/XMLInjectableMethods.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/WebBeansAnnotation.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/WebBeansAnnotation.java?rev=936442&r1=936441&r2=936442&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/WebBeansAnnotation.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/WebBeansAnnotation.java
Wed Apr 21 19:01:09 2010
@@ -23,6 +23,7 @@ import javassist.util.proxy.MethodHandle
 
 import org.apache.webbeans.exception.inject.ExecutionException;
 import org.apache.webbeans.util.Asserts;
+import org.apache.webbeans.util.SecurityUtil;
 
 /**
  * Defines the {@link Annotation} implementation. It is used for creating
@@ -50,7 +51,7 @@ public class WebBeansAnnotation implemen
     public WebBeansAnnotation(Class<? extends Annotation> annotationType)
     {
         this.annotationType = annotationType;
-        this.members = annotationType.getDeclaredMethods();
+        this.members = SecurityUtil.doPrivilegedGetDeclaredMethods(annotationType);
 
         /* Set default method values */
         setDefaultValues();

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ProducerFieldBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ProducerFieldBean.java?rev=936442&r1=936441&r2=936442&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ProducerFieldBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ProducerFieldBean.java
Wed Apr 21 19:01:09 2010
@@ -22,6 +22,7 @@ import javax.enterprise.context.Dependen
 import javax.enterprise.context.spi.CreationalContext;
 
 import org.apache.webbeans.exception.WebBeansException;
+import org.apache.webbeans.util.SecurityUtil;
 import org.apache.webbeans.util.WebBeansUtil;
 
 /**
@@ -78,7 +79,7 @@ public class ProducerFieldBean<T> extend
             
             if (!producerField.isAccessible())
             {
-                producerField.setAccessible(true);
+                SecurityUtil.doPrivilegedSetAccessible(producerField, true);
             }
 
             if (Modifier.isStatic(producerField.getModifiers()))

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/xml/XMLManagedBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/xml/XMLManagedBean.java?rev=936442&r1=936441&r2=936442&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/xml/XMLManagedBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/xml/XMLManagedBean.java
Wed Apr 21 19:01:09 2010
@@ -33,6 +33,7 @@ import org.apache.webbeans.inject.xml.XM
 import org.apache.webbeans.inject.xml.XMLInjectionPointModel;
 import org.apache.webbeans.logger.WebBeansLogger;
 import org.apache.webbeans.util.Asserts;
+import org.apache.webbeans.util.SecurityUtil;
 
 public class XMLManagedBean<T> extends ManagedBean<T>
 {
@@ -121,7 +122,7 @@ public class XMLManagedBean<T> extends M
             Field field = itField.next();
             if (!field.isAccessible())
             {
-                field.setAccessible(true);
+                SecurityUtil.doPrivilegedSetAccessible(field, true);                
             }
 
             try

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/DefinitionUtil.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/DefinitionUtil.java?rev=936442&r1=936441&r2=936442&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/DefinitionUtil.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/DefinitionUtil.java
Wed Apr 21 19:01:09 2010
@@ -76,6 +76,7 @@ import org.apache.webbeans.intercept.ejb
 import org.apache.webbeans.util.AnnotationUtil;
 import org.apache.webbeans.util.Asserts;
 import org.apache.webbeans.util.ClassUtil;
+import org.apache.webbeans.util.SecurityUtil;
 import org.apache.webbeans.util.WebBeansUtil;
 
 /**
@@ -222,7 +223,7 @@ public final class DefinitionUtil
 
             if (AnnotationUtil.isQualifierAnnotation(type))
             {
-                Method[] methods = type.getDeclaredMethods();
+                Method[] methods = SecurityUtil.doPrivilegedGetDeclaredMethods(type);
 
                 for (Method method : methods)
                 {
@@ -559,7 +560,7 @@ public final class DefinitionUtil
     public static Set<ProducerFieldBean<?>> defineProduerFields(InjectionTargetBean<?>
component)
     {
         Set<ProducerFieldBean<?>> producerFields = new HashSet<ProducerFieldBean<?>>();
-        Field[] fields = component.getReturnType().getDeclaredFields();
+        Field[] fields = SecurityUtil.doPrivilegedGetDeclaredFields(component.getReturnType());
         createProducerField(component, producerFields, fields);
 
         return producerFields;
@@ -610,7 +611,7 @@ public final class DefinitionUtil
         Set<ProducerMethodBean<?>> producerComponents = new HashSet<ProducerMethodBean<?>>();
 
         Class<?> clazz = component.getReturnType();
-        Method[] declaredMethods = clazz.getDeclaredMethods();
+        Method[] declaredMethods = SecurityUtil.doPrivilegedGetDeclaredMethods(clazz);
 
         // This methods defined in the class
         for (Method declaredMethod : declaredMethods)
@@ -838,7 +839,7 @@ public final class DefinitionUtil
     public static <T> void defineInternalInjectedFields(AbstractInjectionTargetBean<T>
component, Class<T> clazz, boolean fromSuperClazz)
     {
 
-        Field[] fields = clazz.getDeclaredFields();
+        Field[] fields = SecurityUtil.doPrivilegedGetDeclaredFields(clazz);
         boolean useOwbSpecificInjection = OpenWebBeansConfiguration.getInstance().isOwbSpecificFieldInjection();
             
         if (fields.length != 0)
@@ -933,7 +934,7 @@ public final class DefinitionUtil
     private static <T> void defineInternalInjectedMethods(AbstractInjectionTargetBean<T>
component, Class<T> clazz, boolean fromInherited)
     {
 
-        Method[] methods = clazz.getDeclaredMethods();
+        Method[] methods = SecurityUtil.doPrivilegedGetDeclaredMethods(clazz);
         
         for (Method method : methods)
         {
@@ -963,7 +964,7 @@ public final class DefinitionUtil
                 }
                 else
                 {                    
-                    Method[] beanMethods = component.getReturnType().getDeclaredMethods();
+                    Method[] beanMethods = SecurityUtil.doPrivilegedGetDeclaredMethods(component.getReturnType());
                     boolean defined = false;
                     for (Method beanMethod : beanMethods)
                     {

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/DecoratorUtil.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/DecoratorUtil.java?rev=936442&r1=936441&r2=936442&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/DecoratorUtil.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/DecoratorUtil.java
Wed Apr 21 19:01:09 2010
@@ -34,6 +34,7 @@ import org.apache.webbeans.logger.WebBea
 import org.apache.webbeans.util.AnnotationUtil;
 import org.apache.webbeans.util.Asserts;
 import org.apache.webbeans.util.ClassUtil;
+import org.apache.webbeans.util.SecurityUtil;
 
 /**
  * Decorator related utility class.
@@ -60,7 +61,7 @@ public final class DecoratorUtil
     {       
         Asserts.assertNotNull(decoratorClazz, "Decorator class is null");
         
-        Method[] methods = decoratorClazz.getDeclaredMethods();
+        Method[] methods = SecurityUtil.doPrivilegedGetDeclaredMethods(decoratorClazz);
         for(Method method : methods)
         {
             if(AnnotationUtil.hasMethodAnnotation(method, Produces.class))
@@ -104,7 +105,7 @@ public final class DecoratorUtil
                 throw new WebBeansConfigurationException("Bean : " + bean.getReturnType().getName()
+ " can not be declared final, because it has one or more decorators");
             }
 
-            Method[] methods = clazz.getDeclaredMethods();
+            Method[] methods = SecurityUtil.doPrivilegedGetDeclaredMethods(clazz);
             for (Method method : methods)
             {
                 int modifiers = method.getModifiers();

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/DelegateHandler.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/DelegateHandler.java?rev=936442&r1=936441&r2=936442&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/DelegateHandler.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/DelegateHandler.java
Wed Apr 21 19:01:09 2010
@@ -22,6 +22,7 @@ import org.apache.webbeans.component.Owb
 import org.apache.webbeans.config.OWBLogConst;
 import org.apache.webbeans.exception.WebBeansException;
 import org.apache.webbeans.logger.WebBeansLogger;
+import org.apache.webbeans.util.SecurityUtil;
 
 import javassist.util.proxy.MethodHandler;
 
@@ -64,7 +65,7 @@ public class DelegateHandler implements 
                 {
                     if (!decMethod.isAccessible())
                     {
-                        decMethod.setAccessible(true);
+                        SecurityUtil.doPrivilegedSetAccessible(decMethod, true);
                     }
 
                     Object returnValue = decMethod.invoke(decorator, arguments);
@@ -99,7 +100,7 @@ public class DelegateHandler implements 
 
         if (!method.isAccessible())
         {
-            method.setAccessible(true);
+            SecurityUtil.doPrivilegedSetAccessible(method, true);
         }
 
         Object result = null;

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/WebBeansDecorator.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/WebBeansDecorator.java?rev=936442&r1=936441&r2=936442&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/WebBeansDecorator.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/WebBeansDecorator.java
Wed Apr 21 19:01:09 2010
@@ -46,6 +46,7 @@ import org.apache.webbeans.logger.WebBea
 import org.apache.webbeans.proxy.JavassistProxyFactory;
 import org.apache.webbeans.util.AnnotationUtil;
 import org.apache.webbeans.util.ClassUtil;
+import org.apache.webbeans.util.SecurityUtil;
 
 /**
  * Defines decorators. It wraps the bean instance related
@@ -310,7 +311,7 @@ public class WebBeansDecorator<T> extend
     {
         if (!delegateField.isAccessible())
         {
-            delegateField.setAccessible(true);
+            SecurityUtil.doPrivilegedSetAccessible(delegateField, true);
         }
 
         try

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/ObserverMethodImpl.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/ObserverMethodImpl.java?rev=936442&r1=936441&r2=936442&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/ObserverMethodImpl.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/ObserverMethodImpl.java
Wed Apr 21 19:01:09 2010
@@ -48,6 +48,7 @@ import org.apache.webbeans.exception.Web
 import org.apache.webbeans.inject.impl.InjectionPointFactory;
 import org.apache.webbeans.logger.WebBeansLogger;
 import org.apache.webbeans.util.AnnotationUtil;
+import org.apache.webbeans.util.SecurityUtil;
 import org.apache.webbeans.util.WebBeansUtil;
 
 /**
@@ -177,7 +178,7 @@ public class ObserverMethodImpl<T> imple
         {
             if (!this.observerMethod.isAccessible())
             {
-                this.observerMethod.setAccessible(true);
+                SecurityUtil.doPrivilegedSetAccessible(observerMethod, true);
             }
             
             obargs = new ObserverParams[methodArgsMap.size()];

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/InjectableConstructor.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/InjectableConstructor.java?rev=936442&r1=936441&r2=936442&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/InjectableConstructor.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/InjectableConstructor.java
Wed Apr 21 19:01:09 2010
@@ -24,6 +24,7 @@ import javax.enterprise.inject.spi.Injec
 import org.apache.webbeans.component.AbstractOwbBean;
 import org.apache.webbeans.component.ManagedBean;
 import org.apache.webbeans.exception.WebBeansException;
+import org.apache.webbeans.util.SecurityUtil;
 
 /**
  * Injects the parameters of the {@link ManagedBean} constructor and returns
@@ -79,7 +80,7 @@ public class InjectableConstructor<T> ex
         {
             if(!con.isAccessible())
             {
-                con.setAccessible(true);
+                SecurityUtil.doPrivilegedSetAccessible(con, true);
             }
             
             instance = con.newInstance(list.toArray());

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/InjectableField.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/InjectableField.java?rev=936442&r1=936441&r2=936442&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/InjectableField.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/InjectableField.java
Wed Apr 21 19:01:09 2010
@@ -20,6 +20,7 @@ import javax.enterprise.inject.spi.Injec
 
 import org.apache.webbeans.component.AbstractOwbBean;
 import org.apache.webbeans.exception.WebBeansException;
+import org.apache.webbeans.util.SecurityUtil;
 
 /**
  * Field type injection.
@@ -48,7 +49,7 @@ public class InjectableField extends Abs
             
             if (!field.isAccessible())
             {
-                field.setAccessible(true);
+                SecurityUtil.doPrivilegedSetAccessible(field, true);
             }
 
             Object object = inject(injectedField);

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/InjectableMethods.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/InjectableMethods.java?rev=936442&r1=936441&r2=936442&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/InjectableMethods.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/InjectableMethods.java
Wed Apr 21 19:01:09 2010
@@ -34,6 +34,7 @@ import org.apache.webbeans.container.Bea
 import org.apache.webbeans.container.InjectionResolver;
 import org.apache.webbeans.context.creational.CreationalContextImpl;
 import org.apache.webbeans.exception.WebBeansException;
+import org.apache.webbeans.util.SecurityUtil;
 
 @SuppressWarnings("unchecked")
 public class InjectableMethods<T> extends AbstractInjectable
@@ -128,7 +129,7 @@ public class InjectableMethods<T> extend
         {
             if (!method.isAccessible())
             {
-                method.setAccessible(true);
+                SecurityUtil.doPrivilegedSetAccessible(method, true);
             }
 
             return (T) method.invoke(instance, list.toArray());

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/OWBInjector.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/OWBInjector.java?rev=936442&r1=936441&r2=936442&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/OWBInjector.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/OWBInjector.java
Wed Apr 21 19:01:09 2010
@@ -34,6 +34,7 @@ import org.apache.webbeans.container.Bea
 import org.apache.webbeans.context.creational.CreationalContextImpl;
 import org.apache.webbeans.util.Asserts;
 import org.apache.webbeans.util.ClassUtil;
+import org.apache.webbeans.util.SecurityUtil;
 
 /**
  * Injects dependencies of the given Java EE component
@@ -115,7 +116,7 @@ public final class OWBInjector implement
     public static boolean checkInjectionPointForInterceptorPassivation(Class<?> clazz)
     {
         Asserts.nullCheckForClass(clazz);
-        Field[] fields = clazz.getDeclaredFields();
+        Field[] fields = SecurityUtil.doPrivilegedGetDeclaredFields(clazz);
         for(Field field : fields)
         {
             if(field.getAnnotation(Inject.class) != null)

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/xml/XMLInjectableConstructor.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/xml/XMLInjectableConstructor.java?rev=936442&r1=936441&r2=936442&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/xml/XMLInjectableConstructor.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/xml/XMLInjectableConstructor.java
Wed Apr 21 19:01:09 2010
@@ -25,6 +25,7 @@ import org.apache.webbeans.component.Abs
 import org.apache.webbeans.exception.WebBeansException;
 import org.apache.webbeans.inject.InjectableConstructor;
 import org.apache.webbeans.util.Asserts;
+import org.apache.webbeans.util.SecurityUtil;
 
 /**
  * Defines the injectable constructor.
@@ -69,7 +70,7 @@ public class XMLInjectableConstructor<T>
         {
             if(!con.isAccessible())
             {
-                con.setAccessible(true);
+                SecurityUtil.doPrivilegedSetAccessible(con, true);
             }
             
             instance = con.newInstance(list.toArray());

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/xml/XMLInjectableField.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/xml/XMLInjectableField.java?rev=936442&r1=936441&r2=936442&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/xml/XMLInjectableField.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/xml/XMLInjectableField.java
Wed Apr 21 19:01:09 2010
@@ -21,6 +21,7 @@ import javax.enterprise.context.spi.Crea
 import org.apache.webbeans.component.AbstractOwbBean;
 import org.apache.webbeans.exception.WebBeansException;
 import org.apache.webbeans.inject.InjectableField;
+import org.apache.webbeans.util.SecurityUtil;
 
 public class XMLInjectableField extends InjectableField
 {
@@ -46,7 +47,7 @@ public class XMLInjectableField extends 
         {
             if (!field.isAccessible())
             {
-                field.setAccessible(true);
+                SecurityUtil.doPrivilegedSetAccessible(field, true);
             }
 
             

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/xml/XMLInjectableMethods.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/xml/XMLInjectableMethods.java?rev=936442&r1=936441&r2=936442&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/xml/XMLInjectableMethods.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/xml/XMLInjectableMethods.java
Wed Apr 21 19:01:09 2010
@@ -23,6 +23,7 @@ import javax.enterprise.context.spi.Crea
 
 import org.apache.webbeans.component.AbstractOwbBean;
 import org.apache.webbeans.inject.InjectableMethods;
+import org.apache.webbeans.util.SecurityUtil;
 
 public class XMLInjectableMethods<T> extends InjectableMethods<T>
 {
@@ -58,7 +59,7 @@ public class XMLInjectableMethods<T> ext
         {
             if (!method.isAccessible())
             {
-                method.setAccessible(true);
+                SecurityUtil.doPrivilegedSetAccessible(method, true);
             }
 
             return (T) method.invoke(instance, list.toArray());



Mime
View raw message