openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r952583 - in /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans: config/ container/ context/ context/creational/ decorator/ intercept/ intercept/webbeans/ proxy/ util/ xml/
Date Tue, 08 Jun 2010 09:21:24 GMT
Author: struberg
Date: Tue Jun  8 09:21:23 2010
New Revision: 952583

URL: http://svn.apache.org/viewvc?rev=952583&view=rev
Log:
OWB-275 cleanup code

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/OwbParametrizedTypeImpl.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansFinder.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/ExternalScope.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/InjectionResolver.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/ContextFactory.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/CreationalContextImpl.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/decorator/WebBeansDecorator.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InvocationContextImpl.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/webbeans/WebBeansInterceptor.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/JavassistProxyFactory.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/AnnotationUtil.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/SecurityUtil.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/XMLUtil.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/OwbParametrizedTypeImpl.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/OwbParametrizedTypeImpl.java?rev=952583&r1=952582&r2=952583&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/OwbParametrizedTypeImpl.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/OwbParametrizedTypeImpl.java Tue Jun  8 09:21:23 2010
@@ -97,28 +97,43 @@ public class OwbParametrizedTypeImpl imp
     public boolean equals(Object obj)
     {
         if (this == obj)
+        {
             return true;
+        }
         if (obj == null)
+        {
             return false;
+        }
         if (getClass() != obj.getClass())
+        {
             return false;
+        }
         OwbParametrizedTypeImpl other = (OwbParametrizedTypeImpl) obj;
         if (!Arrays.equals(getActualTypeArguments(), other.getActualTypeArguments()))
+        {
             return false;
+        }
         if (owner == null)
         {
             if (other.owner != null)
                 return false;
         }
         else if (!owner.equals(other.owner))
+        {
             return false;
+        }
         if (rawType == null)
         {
             if (other.rawType != null)
+            {
                 return false;
+            }
         }
         else if (!rawType.equals(other.rawType))
+        {
             return false;
+        }
+        
         return true;
     }
 

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansFinder.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansFinder.java?rev=952583&r1=952582&r2=952583&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansFinder.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansFinder.java Tue Jun  8 09:21:23 2010
@@ -104,7 +104,8 @@ public final class WebBeansFinder
                 }
                 catch (ClassNotFoundException e)
                 {
-                    throw new WebBeansException("Class not found exception in creating instance with class : " + singletonName, e);                }
+                    throw new WebBeansException("Class not found exception in creating instance with class : " + singletonName, e);
+                }
             }
         }
 

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/ExternalScope.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/ExternalScope.java?rev=952583&r1=952582&r2=952583&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/ExternalScope.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/ExternalScope.java Tue Jun  8 09:21:23 2010
@@ -20,16 +20,16 @@ package org.apache.webbeans.container;
 
 
 import java.lang.annotation.Annotation;
-import javax.enterprise.inject.spi.BeforeBeanDiscovery;
 
 import org.apache.webbeans.config.DefaultAnnotation;
 
 
 /**
  * A wrapper for an external scope which can be added by
- * {@link BeforeBeanDiscovery#addScope(Class, boolean, boolean)}.
+ * {@link javax.enterprise.inject.spi.BeforeBeanDiscovery#addScope(Class, boolean, boolean)}.
  */
-public class ExternalScope {
+public class ExternalScope
+{
 
     private Class<? extends Annotation> scope;
     private boolean normal;
@@ -61,7 +61,7 @@ public class ExternalScope {
     
     /**
      * @return an instance of the annotation class we got set 
-     *         in {@link BeforeBeanDiscovery#addScope(Class, boolean, boolean)}
+     *         in {@link javax.enterprise.inject.spi.BeforeBeanDiscovery#addScope(Class, boolean, boolean)}
      */
     public Annotation getScopeAnnotation()
     {

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/InjectionResolver.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/InjectionResolver.java?rev=952583&r1=952582&r2=952583&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/InjectionResolver.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/InjectionResolver.java Tue Jun  8 09:21:23 2010
@@ -21,7 +21,6 @@ package org.apache.webbeans.container;
 import java.lang.annotation.Annotation;
 import java.lang.reflect.ParameterizedType;
 import java.lang.reflect.Type;
-import java.lang.reflect.TypeVariable;
 import java.util.Collections;
 import java.util.HashSet;
 import java.util.Iterator;
@@ -38,7 +37,6 @@ import javax.enterprise.inject.spi.Injec
 import org.apache.webbeans.annotation.AnyLiteral;
 import org.apache.webbeans.annotation.DefaultLiteral;
 import org.apache.webbeans.component.AbstractOwbBean;
-import org.apache.webbeans.config.WebBeansFinder;
 import org.apache.webbeans.exception.WebBeansConfigurationException;
 import org.apache.webbeans.exception.inject.NullableDependencyException;
 import org.apache.webbeans.logger.WebBeansLogger;
@@ -57,7 +55,7 @@ import org.apache.webbeans.util.WebBeans
  * </p>
  * 
  * @version $Rev$ $Date$
- * @see WebBeansFinder
+ * @see org.apache.webbeans.config.WebBeansFinder
  */
 public class InjectionResolver
 {
@@ -101,7 +99,7 @@ public class InjectionResolver
      * Returns bean manager injection resolver.
      * 
      * @return bean manager injection resolver
-     * @see WebBeansFinder
+     * @see org.apache.webbeans.config.WebBeansFinder
      */
     public static InjectionResolver getInstance()
     {
@@ -113,7 +111,7 @@ public class InjectionResolver
     /**
      * Check the type of the injection point.
      * <p>
-     * Injection point type can not be {@link TypeVariable}.
+     * Injection point type can not be {@link java.lang.reflect.TypeVariable}.
      * </p>
      * 
      * @param injectionPoint injection point
@@ -136,7 +134,7 @@ public class InjectionResolver
      * injection point definition.
      * 
      * @param injectionPoint injection point
-     * @throws If bean is not avialable in the current deployment for given injection
+     * @throws WebBeansConfigurationException If bean is not avialable in the current deployment for given injection
      */
     public void checkInjectionPoints(InjectionPoint injectionPoint)
     {        
@@ -389,9 +387,7 @@ public class InjectionResolver
     /**
      * Resolution by type.
      * 
-     * @param <T> bean type info
      * @param injectionPointType injection point api type
-     * @param injectionPointTypeArguments actual type arguments if parameterized type
      * @param qualifiers qualifiers of the injection point
      * @return set of resolved beans
      */
@@ -494,7 +490,6 @@ public class InjectionResolver
     /**
      * Returns specialized beans if exists, otherwise return input result
      * 
-     * @param <T> bean class type
      * @param result result beans
      * @return specialized beans if exists, otherwise return input result
      */
@@ -565,7 +560,6 @@ public class InjectionResolver
     /**
      * Returns filtered bean set according to the qualifiers.
      * 
-     * @param <T> bean class
      * @param remainingSet bean set for filtering by qualifier
      * @param annotations qualifiers on injection point
      * @return filtered bean set according to the qualifiers

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/ContextFactory.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/ContextFactory.java?rev=952583&r1=952582&r2=952583&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/ContextFactory.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/ContextFactory.java Tue Jun  8 09:21:23 2010
@@ -72,8 +72,8 @@ public final class ContextFactory
     
     public static void destroyRequestContext(Object request)
     {
-    	ContextsService contextService = ServiceLoader.getService(ContextsService.class);
-    	contextService.endContext(RequestScoped.class, request);
+        ContextsService contextService = ServiceLoader.getService(ContextsService.class);
+        contextService.endContext(RequestScoped.class, request);
     }
 
     public static void initSessionContext(Object session)
@@ -91,7 +91,7 @@ public final class ContextFactory
 
     public static void destroySessionContext(Object session)
     {
-    	ContextsService contextService = ServiceLoader.getService(ContextsService.class);
+        ContextsService contextService = ServiceLoader.getService(ContextsService.class);
         contextService.endContext(SessionScoped.class, session);
     }
 
@@ -121,7 +121,7 @@ public final class ContextFactory
      */
     public static void destroyApplicationContext(Object parameter)
     {
-    	ContextsService contextService = ServiceLoader.getService(ContextsService.class);
+        ContextsService contextService = ServiceLoader.getService(ContextsService.class);
         contextService.endContext(ApplicationScoped.class, parameter);
     }
     
@@ -140,7 +140,7 @@ public final class ContextFactory
     
     public static void destroySingletonContext(Object parameter)
     {
-    	ContextsService contextService = ServiceLoader.getService(ContextsService.class);
+        ContextsService contextService = ServiceLoader.getService(ContextsService.class);
         contextService.endContext(Singleton.class, parameter);
     }
 
@@ -159,7 +159,7 @@ public final class ContextFactory
 
     public static void destroyConversationContext()
     {
-    	ContextsService contextService = ServiceLoader.getService(ContextsService.class);
+        ContextsService contextService = ServiceLoader.getService(ContextsService.class);
         contextService.endContext(ConversationScoped.class, null);
     }
 
@@ -250,7 +250,7 @@ public final class ContextFactory
      */
     public static void activateContext(Class<? extends Annotation> scopeType)
     {
-    	ContextsService contextService = ServiceLoader.getService(ContextsService.class);
+        ContextsService contextService = ServiceLoader.getService(ContextsService.class);
         contextService.activateContext(scopeType);
     }
     
@@ -259,7 +259,7 @@ public final class ContextFactory
      */
     public static void deActivateContext(Class<? extends Annotation> scopeType)
     {
-    	ContextsService contextService = ServiceLoader.getService(ContextsService.class);
+        ContextsService contextService = ServiceLoader.getService(ContextsService.class);
         contextService.deActivateContext(scopeType);
     }
     

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/CreationalContextImpl.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/CreationalContextImpl.java?rev=952583&r1=952582&r2=952583&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/CreationalContextImpl.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/CreationalContextImpl.java Tue Jun  8 09:21:23 2010
@@ -41,7 +41,7 @@ public class CreationalContextImpl<T> im
 
     /**Contextual bean dependent instances*/
     //contextual instance --> dependents
-    private Map<Object, List<DependentCreationalContext<?>>> dependentObjects = 
+    private Map<Object, List<DependentCreationalContext<?>>> dependentObjects =
         Collections.synchronizedMap(new WeakHashMap<Object, List<DependentCreationalContext<?>>>());
      
     /**Contextual bean*/

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=952583&r1=952582&r2=952583&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 Tue Jun  8 09:21:23 2010
@@ -142,7 +142,7 @@ public class WebBeansDecorator<T> extend
                 else
                 {
                     throw new WebBeansConfigurationException("Decorators must have a one @Delegate injection point. " +
-                    		"But the decorator bean : " + toString() + " has more than one");
+                            "But the decorator bean : " + toString() + " has more than one");
                 }
             }            
         }
@@ -155,7 +155,7 @@ public class WebBeansDecorator<T> extend
         }
         
         String message = new String("Error in decorator : "+ toString() + ". The delegate injection point must be an injected field, " +
-        		"initializer method parameter or bean constructor method parameter. ");
+                "initializer method parameter or bean constructor method parameter. ");
         
         if(!(ipFound.getMember() instanceof Constructor))
         {
@@ -534,27 +534,27 @@ public class WebBeansDecorator<T> extend
         return this.wrappedBean.getBeanClass();
     }
 
-	@Override
-	public Set<Class<? extends Annotation>> getStereotypes() 
-	{
+    @Override
+    public Set<Class<? extends Annotation>> getStereotypes()
+    {
         if(this.customDecorator != null)
         {
             return this.customDecorator.getStereotypes();
         }
-	    
-		return this.wrappedBean.getStereotypes();
-	}
-
-	@Override
-	public Set<Type> getDecoratedTypes() 
-	{
+
+        return this.wrappedBean.getStereotypes();
+    }
+
+    @Override
+    public Set<Type> getDecoratedTypes()
+    {
         if(this.customDecorator != null)
         {
             return this.customDecorator.getDecoratedTypes();
         }
-	    
-		return this.decoratedTypes;
-	}
+
+        return this.decoratedTypes;
+    }
 
     @Override
     public boolean isAlternative()
@@ -566,11 +566,11 @@ public class WebBeansDecorator<T> extend
 
         return this.wrappedBean.isAlternative();
     }
-    
+
     @Override
     public void validatePassivationDependencies()
     {
         this.wrappedBean.validatePassivationDependencies();
-    }    
-    
+    }
+
 }

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InvocationContextImpl.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InvocationContextImpl.java?rev=952583&r1=952582&r2=952583&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InvocationContextImpl.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InvocationContextImpl.java Tue Jun  8 09:21:23 2010
@@ -319,7 +319,7 @@ public class InvocationContextImpl imple
 
         return result;
     }
-    
+
     /**
      * {@inheritDoc}
      */
@@ -338,38 +338,38 @@ public class InvocationContextImpl imple
             {
                 if (params.length != this.parameters.length)
                 {
-                	 throw new IllegalArgumentException("Expected " + this.parameters.length + " " +
-                	 		"parameters, but only got " + params.length + " parameters"); 
+                    throw new IllegalArgumentException("Expected " + this.parameters.length + " " +
+                            "parameters, but only got " + params.length + " parameters");
                 }
 
                 Class<?>[] methodParameters = this.method.getParameterTypes();
                 int i = 0;
                 for (Object obj : params)
                 {
-                	Class<?> parameterType = methodParameters[i++];
-                    if (obj == null) 
+                    Class<?> parameterType = methodParameters[i++];
+                    if (obj == null)
                     {
-                        if (parameterType.isPrimitive()) 
+                        if (parameterType.isPrimitive())
                         {
                             throw new IllegalArgumentException("Expected parameter " + i + " to be primitive type " + parameterType.getName() +
-                                ", but got a parameter that is null");
+                                    ", but got a parameter that is null");
                         }
                     }
                     else
                     {
-                    	//Primitive check
-                    	if(parameterType.isPrimitive())
-                    	{
-                    		//First change to wrapper for comparision
-                    		parameterType = ClassUtil.getPrimitiveWrapper(parameterType);
-                    	}
-                    	
-                    	//Actual check
-                    	if (!parameterType.isInstance(obj))                    	
-                    	{
+                        //Primitive check
+                        if(parameterType.isPrimitive())
+                        {
+                            //First change to wrapper for comparision
+                            parameterType = ClassUtil.getPrimitiveWrapper(parameterType);
+                        }
+
+                        //Actual check
+                        if (!parameterType.isInstance(obj))
+                        {
                             throw new IllegalArgumentException("Expected parameter " + i + " to be of type " + parameterType.getName() +
-                                    ", but got a parameter of type " + obj.getClass().getName());                                        		
-                    	}                    	
+                                    ", but got a parameter of type " + obj.getClass().getName());
+                        }
                     }
                 }
 

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/webbeans/WebBeansInterceptor.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/webbeans/WebBeansInterceptor.java?rev=952583&r1=952582&r2=952583&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/webbeans/WebBeansInterceptor.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/webbeans/WebBeansInterceptor.java Tue Jun  8 09:21:23 2010
@@ -74,8 +74,8 @@ import org.apache.webbeans.xml.XMLAnnota
  */
 public class WebBeansInterceptor<T> extends AbstractOwbBean<T> implements OwbInterceptor<T>
 {
-	private static final WebBeansLogger logger = WebBeansLogger.getLogger(WebBeansInterceptor.class);
-	
+    private static final WebBeansLogger logger = WebBeansLogger.getLogger(WebBeansInterceptor.class);
+
     /** InterceptorBindingTypes exist on the interceptor class */
     private Map<Class<? extends Annotation>, Annotation> interceptorBindingSet = new HashMap<Class<? extends Annotation>, Annotation>();
 
@@ -156,18 +156,18 @@ public class WebBeansInterceptor<T> exte
         /* This interceptor is enabled if all of its interceptor bindings are present on the bean */
         for (Annotation ann : getInterceptorBindings())
         {
-            Class<? extends Annotation> bindingType = ann.annotationType(); 
-        	int index = bindingTypes.indexOf(bindingType);
-        	if (index < 0) 
-        	{
-        	    return false; /* at least one of this interceptors types is not in the beans bindingTypes */	
-        	}
-        	
-        	if (!AnnotationUtil.hasAnnotationMember(bindingTypes.get(index), annots.get(index), ann))
-        	
-        	{
-        		return false;
-        	}
+            Class<? extends Annotation> bindingType = ann.annotationType();
+            int index = bindingTypes.indexOf(bindingType);
+            if (index < 0)
+            {
+                return false; /* at least one of this interceptors types is not in the beans bindingTypes */
+            }
+
+            if (!AnnotationUtil.hasAnnotationMember(bindingTypes.get(index), annots.get(index), ann))
+
+            {
+                return false;
+            }
         }
         
         return true;
@@ -398,36 +398,36 @@ public class WebBeansInterceptor<T> exte
         return this.delegateBean.getBeanClass();
     }
 
-	@Override
-	public Set<Class<? extends Annotation>> getStereotypes() 
-	{ 
-		return this.delegateBean.getStereotypes();
-	}
-
-	@Override
-	public Object intercept(InterceptionType type, T instance,InvocationContext ctx) 
-	{
-		Method method = getMethod(type);
-		try 
-		{
-			method.invoke(instance,new Object[]{ctx});
-		} 
-		catch (Exception e)
-		{
-			logger.error(e);
-			throw new WebBeansException(e);
-		}
-		
-		return null;
-	}
-
-	@Override
-	public boolean intercepts(InterceptionType type) 
-	{
-		Method method = getMethod(type);
-		
-		return method != null ? true : false;
-	}
+    @Override
+    public Set<Class<? extends Annotation>> getStereotypes()
+    {
+        return this.delegateBean.getStereotypes();
+    }
+
+    @Override
+    public Object intercept(InterceptionType type, T instance,InvocationContext ctx)
+    {
+        Method method = getMethod(type);
+        try
+        {
+            method.invoke(instance,new Object[]{ctx});
+        }
+        catch (Exception e)
+        {
+            logger.error(e);
+            throw new WebBeansException(e);
+        }
+
+        return null;
+    }
+
+    @Override
+    public boolean intercepts(InterceptionType type)
+    {
+        Method method = getMethod(type);
+
+        return method != null ? true : false;
+    }
 
     @Override
     public boolean isAlternative()

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/JavassistProxyFactory.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/JavassistProxyFactory.java?rev=952583&r1=952582&r2=952583&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/JavassistProxyFactory.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/proxy/JavassistProxyFactory.java Tue Jun  8 09:21:23 2010
@@ -238,30 +238,30 @@ public final class JavassistProxyFactory
 
         return result;
     }
-    
+
 
     public static Class<?> getProxyClass(ProxyFactory factory)
     {
-    	Class<?> proxyClass = null;
+        Class<?> proxyClass = null;
         try
         {
-        	proxyClass = SecurityUtil.doPrivilegedCreateClass(factory);
-        	
+            proxyClass = SecurityUtil.doPrivilegedCreateClass(factory);
+
         }catch(Exception e)
         {
             ProxyFactory.classLoaderProvider = new ProxyFactory.ClassLoaderProvider(){
 
-    			@Override
-    			public ClassLoader get(ProxyFactory pf) 
-    			{
-    				return Thread.currentThread().getContextClassLoader();
-    			}
-            	
+                @Override
+                public ClassLoader get(ProxyFactory pf)
+                {
+                    return Thread.currentThread().getContextClassLoader();
+                }
+
             };
-            
-            proxyClass = SecurityUtil.doPrivilegedCreateClass(factory);       	
-        }                
-            	
+
+            proxyClass = SecurityUtil.doPrivilegedCreateClass(factory);
+        }
+
         return proxyClass;
     }
     

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/AnnotationUtil.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/AnnotationUtil.java?rev=952583&r1=952582&r2=952583&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/AnnotationUtil.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/AnnotationUtil.java Tue Jun  8 09:21:23 2010
@@ -942,18 +942,18 @@ public final class AnnotationUtil
      */
     public static boolean hasAnyQualifier(Bean<?> bean)
     {
-    	Asserts.assertNotNull(bean, "bean parameter can not be null");
-    	Set<Annotation> qualifiers = bean.getQualifiers();
-    	
-    	for(Annotation ann : qualifiers)
-    	{
-    		if(ann.annotationType().equals(Any.class))
-    		{
-    			return true;
-    		}
-    	}
-    	
-    	return false;
+        Asserts.assertNotNull(bean, "bean parameter can not be null");
+        Set<Annotation> qualifiers = bean.getQualifiers();
+
+        for(Annotation ann : qualifiers)
+        {
+            if(ann.annotationType().equals(Any.class))
+            {
+                return true;
+            }
+        }
+
+        return false;
     }
 
     

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=952583&r1=952582&r2=952583&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 Jun  8 09:21:23 2010
@@ -25,208 +25,161 @@ import java.lang.reflect.Method;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 import javassist.util.proxy.ProxyFactory;
- 
-public class SecurityUtil 
-{		
-	
-		private final static int METHOD_CLASS_GETDECLAREDCONSTRUCTOR = 0x01; 
-	
-		private final static int METHOD_CLASS_GETDECLAREDCONSTRUCTORS = 0x02; 
-
-		private final static int METHOD_CLASS_GETDECLAREDMETHOD = 0x03; 
-
-		private final static int METHOD_CLASS_GETDECLAREDMETHODS = 0x04; 
-		
-		private final static int METHOD_CLASS_GETDECLAREDFIELD = 0x05;
-
-		private final static int METHOD_CLASS_GETDECLAREDFIELDS = 0x06;
-
-		@SuppressWarnings("unchecked")
-		public static <T> Constructor<T> doPrivilegedGetDeclaredConstructor(Class<T> clazz, Class<?>... parameterTypes) throws NoSuchMethodException
-		{
-			Object obj = AccessController.doPrivileged(
-					new PrivilegedActionForClass(clazz, parameterTypes, METHOD_CLASS_GETDECLAREDCONSTRUCTOR));
-			if (obj instanceof NoSuchMethodException) throw (NoSuchMethodException)obj;
-			return (Constructor<T>)obj;
-		}
-		
-		@SuppressWarnings("unchecked")
-		public static <T> Constructor<T>[] doPrivilegedGetDeclaredConstructors(Class<T> clazz)
-		{
-			Object obj = AccessController.doPrivileged(
-					new PrivilegedActionForClass(clazz, null, METHOD_CLASS_GETDECLAREDCONSTRUCTORS));
-			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) 
-		{
-			Object obj = AccessController.doPrivileged(
-					new PrivilegedActionForClass(clazz, null, METHOD_CLASS_GETDECLAREDMETHODS));
-			return (Method[])obj;			
-		}
-		
-		public static <T> Field doPrivilegedGetDeclaredField(Class<T> clazz, String name) throws NoSuchFieldException 
-		{
-			Object obj = AccessController.doPrivileged(
-					new PrivilegedActionForClass(clazz, name, METHOD_CLASS_GETDECLAREDFIELD));
-			if (obj instanceof NoSuchFieldException) throw (NoSuchFieldException)obj;
-			return (Field)obj;
-		}
-		
-		public static <T> Field[] doPrivilegedGetDeclaredFields(Class<T> clazz) 
-		{
-			Object obj = AccessController.doPrivileged(
-					new PrivilegedActionForClass(clazz, null, METHOD_CLASS_GETDECLAREDFIELDS));
-			return (Field[])obj;
-		}
-		
-		protected static class PrivilegedActionForClass implements PrivilegedAction<Object> 
-		{
-			Class<?> clazz;
-			
-			Object parameters;
-			
-			int method;
-			
-			protected PrivilegedActionForClass(Class<?> clazz, Object parameters, int method) 
-			{
-				this.clazz = clazz;
-				this.parameters = parameters;
-				this.method = method;
-			}
-			
-			public Object run()
-			{
-				try 
-				{
-					switch (method) 
-					{
-						case METHOD_CLASS_GETDECLAREDCONSTRUCTOR:
-							return clazz.getDeclaredConstructor((Class<?>[])parameters);
-						case METHOD_CLASS_GETDECLAREDCONSTRUCTORS:
-							return clazz.getDeclaredConstructors();
-						case METHOD_CLASS_GETDECLAREDMETHOD:
-							String name = (String)((Object[])parameters)[0];
-							Class<?>[] realParameters = (Class<?>[])((Object[])parameters)[1];
-							return clazz.getDeclaredMethod(name, realParameters);
-						case METHOD_CLASS_GETDECLAREDMETHODS:
-							return clazz.getDeclaredMethods();
-						case METHOD_CLASS_GETDECLAREDFIELD:
-							return clazz.getDeclaredField((String)parameters);
-						case METHOD_CLASS_GETDECLAREDFIELDS:
-							return clazz.getDeclaredFields();
-					}
-				} 
-				catch (Exception exception) 
-				{
-					return exception;
-				}
-				return null;
-			}			
-			
-		}
-		
-		public static Object doPrivilegedSetAccessible(AccessibleObject obj, boolean flag) 
-		{
-			AccessController.doPrivileged(new PrivilegedActionForAccessibleObject(obj, flag));
-			return null;
-		};
-		
-		protected static class PrivilegedActionForAccessibleObject implements PrivilegedAction<Object> 
-		{
-			
-			AccessibleObject object;
-			
-			boolean flag;
-			
-			protected PrivilegedActionForAccessibleObject(AccessibleObject object, boolean flag) 
-			{
-				this.object = object;
-				this.flag = flag;
-			}
-			
-			public Object run() 
-			{
-				object.setAccessible(flag);
-				return null;
-			}
-		}
-		
-		
-		public static Class<?> doPrivilegedCreateClass(ProxyFactory factory) 
-		{
-			Class<?> ret = (Class<?>)AccessController.doPrivileged(new PrivilegedActionForProxyFactory(factory));
-			return ret;
-		}
-		
-		protected static class PrivilegedActionForProxyFactory implements PrivilegedAction<Object>
-		{
-			ProxyFactory factory;
-			
-			protected PrivilegedActionForProxyFactory(ProxyFactory factory) 
-			{
-				this.factory = factory;
-			}
-			
-			public Object run() 
-			{
-				return factory.createClass();
-			}
-		}
-		
-/*		
-		public static <T> Set<T> doPrivilegedSetAdd(Set<T> set, T item)
-		{
-			AccessController.doPrivileged(new PrivilegedActionForSet<T>(set, item));
-			return null;
-		}
-		
-		protected static class PrivilegedActionForSet<T> implements PrivilegedAction<T>
-		{
-			Set<T> set;
-			
-			T item;
-			
-			protected PrivilegedActionForSet(Set<T> set, T item) 
-			{
-				this.set = set;
-				this.item = item;
-			}
-			
-			public T run() 
-			{
-				 set.add(item);
-				 return null;
-			}
-		}
- 		
-		public static String doPrivilegedToString(java.lang.annotation.Annotation a) 
-		{
-			return (String)AccessController.doPrivileged(new PrivilegedActionForAnnotation(a));
-		}
-		
-		protected static class PrivilegedActionForAnnotation implements PrivilegedAction<Object>
-		{
-			java.lang.annotation.Annotation annotation;
-			
-			protected PrivilegedActionForAnnotation(java.lang.annotation.Annotation annotation)
-			{
-				this.annotation = annotation;
-			}
-			
-			public Object run() 
-			{
-				return annotation.toString();
-			}
-		}
-*/	
-		
+
+public class SecurityUtil
+{
+
+    private final static int METHOD_CLASS_GETDECLAREDCONSTRUCTOR = 0x01;
+
+    private final static int METHOD_CLASS_GETDECLAREDCONSTRUCTORS = 0x02;
+
+    private final static int METHOD_CLASS_GETDECLAREDMETHOD = 0x03;
+
+    private final static int METHOD_CLASS_GETDECLAREDMETHODS = 0x04;
+
+    private final static int METHOD_CLASS_GETDECLAREDFIELD = 0x05;
+
+    private final static int METHOD_CLASS_GETDECLAREDFIELDS = 0x06;
+
+    @SuppressWarnings("unchecked")
+    public static <T> Constructor<T> doPrivilegedGetDeclaredConstructor(Class<T> clazz, Class<?>... parameterTypes) throws NoSuchMethodException
+    {
+        Object obj = AccessController.doPrivileged(
+                new PrivilegedActionForClass(clazz, parameterTypes, METHOD_CLASS_GETDECLAREDCONSTRUCTOR));
+        if (obj instanceof NoSuchMethodException) throw (NoSuchMethodException)obj;
+        return (Constructor<T>)obj;
+    }
+
+    @SuppressWarnings("unchecked")
+    public static <T> Constructor<T>[] doPrivilegedGetDeclaredConstructors(Class<T> clazz)
+    {
+        Object obj = AccessController.doPrivileged(
+                new PrivilegedActionForClass(clazz, null, METHOD_CLASS_GETDECLAREDCONSTRUCTORS));
+        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)
+    {
+        Object obj = AccessController.doPrivileged(
+                new PrivilegedActionForClass(clazz, null, METHOD_CLASS_GETDECLAREDMETHODS));
+        return (Method[])obj;
+    }
+
+    public static <T> Field doPrivilegedGetDeclaredField(Class<T> clazz, String name) throws NoSuchFieldException
+    {
+        Object obj = AccessController.doPrivileged(
+                new PrivilegedActionForClass(clazz, name, METHOD_CLASS_GETDECLAREDFIELD));
+        if (obj instanceof NoSuchFieldException) throw (NoSuchFieldException)obj;
+        return (Field)obj;
+    }
+
+    public static <T> Field[] doPrivilegedGetDeclaredFields(Class<T> clazz)
+    {
+        Object obj = AccessController.doPrivileged(
+                new PrivilegedActionForClass(clazz, null, METHOD_CLASS_GETDECLAREDFIELDS));
+        return (Field[])obj;
+    }
+
+    protected static class PrivilegedActionForClass implements PrivilegedAction<Object>
+    {
+        Class<?> clazz;
+
+        Object parameters;
+
+        int method;
+
+        protected PrivilegedActionForClass(Class<?> clazz, Object parameters, int method)
+        {
+            this.clazz = clazz;
+            this.parameters = parameters;
+            this.method = method;
+        }
+
+        public Object run()
+        {
+            try
+            {
+                switch (method)
+                {
+                    case METHOD_CLASS_GETDECLAREDCONSTRUCTOR:
+                        return clazz.getDeclaredConstructor((Class<?>[])parameters);
+                    case METHOD_CLASS_GETDECLAREDCONSTRUCTORS:
+                        return clazz.getDeclaredConstructors();
+                    case METHOD_CLASS_GETDECLAREDMETHOD:
+                        String name = (String)((Object[])parameters)[0];
+                        Class<?>[] realParameters = (Class<?>[])((Object[])parameters)[1];
+                        return clazz.getDeclaredMethod(name, realParameters);
+                    case METHOD_CLASS_GETDECLAREDMETHODS:
+                        return clazz.getDeclaredMethods();
+                    case METHOD_CLASS_GETDECLAREDFIELD:
+                        return clazz.getDeclaredField((String)parameters);
+                    case METHOD_CLASS_GETDECLAREDFIELDS:
+                        return clazz.getDeclaredFields();
+                }
+            }
+            catch (Exception exception)
+            {
+                return exception;
+            }
+            return null;
+        }
+
+    }
+
+    public static Object doPrivilegedSetAccessible(AccessibleObject obj, boolean flag)
+    {
+        AccessController.doPrivileged(new PrivilegedActionForAccessibleObject(obj, flag));
+        return null;
+    };
+
+    protected static class PrivilegedActionForAccessibleObject implements PrivilegedAction<Object>
+    {
+
+        AccessibleObject object;
+
+        boolean flag;
+
+        protected PrivilegedActionForAccessibleObject(AccessibleObject object, boolean flag)
+        {
+            this.object = object;
+            this.flag = flag;
+        }
+
+        public Object run()
+        {
+            object.setAccessible(flag);
+            return null;
+        }
+    }
+
+
+    public static Class<?> doPrivilegedCreateClass(ProxyFactory factory)
+    {
+        Class<?> ret = (Class<?>)AccessController.doPrivileged(new PrivilegedActionForProxyFactory(factory));
+        return ret;
+    }
+
+    protected static class PrivilegedActionForProxyFactory implements PrivilegedAction<Object>
+    {
+        ProxyFactory factory;
+
+        protected PrivilegedActionForProxyFactory(ProxyFactory factory)
+        {
+            this.factory = factory;
+        }
+
+        public Object run()
+        {
+            return factory.createClass();
+        }
+    }
+
 }

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/XMLUtil.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/XMLUtil.java?rev=952583&r1=952582&r2=952583&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/XMLUtil.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/XMLUtil.java Tue Jun  8 09:21:23 2010
@@ -67,78 +67,78 @@ public class XMLUtil {
 
     protected static boolean verifyNameSpace(Element element)
     {
-    	boolean ret;
-    	if (element.getNamespaceURI() == null)
-    	{
-    		return false;
-    	}
-    	Node node;
-    	NodeList ns = element.getChildNodes();
-    	for(int i=0; i<ns.getLength(); i++) 
-    	{
-    		node = ns.item(i);
-    		if (!(node instanceof Element)) continue;
-    		ret = verifyNameSpace((Element)node);
-    		if (!ret) return false;
-    	}
-    	return true;
-    }
-	
-	protected static void updateNameSpacePackageMapping(Element root) 
-	{
-		if (!verifyNameSpace(root)) 
-		{
-            throw new WebBeansConfigurationException(log.getTokenString(OWBLogConst.EXCEPT_0012));			
-		}
-		if (root.getNamespaceURI() != null)
-		{
-			WebBeansNameSpaceContainer.getInstance().
-			addNewPackageNameSpace(root.getNamespaceURI());
-		} else {
-			String attr = root.getAttribute("xmlns");
-			if (attr != null) {
-				WebBeansNameSpaceContainer.getInstance().
-				addNewPackageNameSpace(root.getNamespaceURI());
-			} 
-		}
-		NamedNodeMap attrs = root.getAttributes();
-		for(int i=0; i<attrs.getLength(); i++)
-		{
-			// hack the code here, since I did'nt find NameSpace support
-			// in Java DOM.
-			Attr attr = (Attr)attrs.item(i);
-			if (attr.getName().toLowerCase().startsWith("xmlns")) 
-			{
+        boolean ret;
+        if (element.getNamespaceURI() == null)
+        {
+            return false;
+        }
+        Node node;
+        NodeList ns = element.getChildNodes();
+        for(int i=0; i<ns.getLength(); i++)
+        {
+            node = ns.item(i);
+            if (!(node instanceof Element)) continue;
+            ret = verifyNameSpace((Element)node);
+            if (!ret) return false;
+        }
+        return true;
+    }
+
+    protected static void updateNameSpacePackageMapping(Element root)
+    {
+        if (!verifyNameSpace(root))
+        {
+            throw new WebBeansConfigurationException(log.getTokenString(OWBLogConst.EXCEPT_0012));
+        }
+        if (root.getNamespaceURI() != null)
+        {
+            WebBeansNameSpaceContainer.getInstance().
+                    addNewPackageNameSpace(root.getNamespaceURI());
+        } else {
+            String attr = root.getAttribute("xmlns");
+            if (attr != null) {
+                WebBeansNameSpaceContainer.getInstance().
+                        addNewPackageNameSpace(root.getNamespaceURI());
+            }
+        }
+        NamedNodeMap attrs = root.getAttributes();
+        for(int i=0; i<attrs.getLength(); i++)
+        {
+            // hack the code here, since I did'nt find NameSpace support
+            // in Java DOM.
+            Attr attr = (Attr)attrs.item(i);
+            if (attr.getName().toLowerCase().startsWith("xmlns"))
+            {
                 WebBeansNameSpaceContainer.getInstance().addNewPackageNameSpace(attr.getValue());
-			}
-		}
-	}
-	
+            }
+        }
+    }
+
     public static Element getRootElement(InputStream stream) throws WebBeansException
     {
-    	
-    	try 
-    	{
-	    	DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
-			factory.setCoalescing(false);
-			factory.setExpandEntityReferences(true);
-			factory.setIgnoringComments(true);
-			factory.setIgnoringElementContentWhitespace(true);
-			factory.setNamespaceAware(true);
-			factory.setValidating(false);
-			DocumentBuilder documentBuilder = factory.newDocumentBuilder();
-			documentBuilder.setErrorHandler(new WebBeansErrorHandler());
-			documentBuilder.setEntityResolver(new WebBeansResolver());
-	    	
-			Document doc = documentBuilder.parse(stream);
-			Element root = doc.getDocumentElement();
-			updateNameSpacePackageMapping(root);
-			return root;
-    	} catch (Exception e)
-    	{
+
+        try
+        {
+            DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+            factory.setCoalescing(false);
+            factory.setExpandEntityReferences(true);
+            factory.setIgnoringComments(true);
+            factory.setIgnoringElementContentWhitespace(true);
+            factory.setNamespaceAware(true);
+            factory.setValidating(false);
+            DocumentBuilder documentBuilder = factory.newDocumentBuilder();
+            documentBuilder.setErrorHandler(new WebBeansErrorHandler());
+            documentBuilder.setEntityResolver(new WebBeansResolver());
+
+            Document doc = documentBuilder.parse(stream);
+            Element root = doc.getDocumentElement();
+            updateNameSpacePackageMapping(root);
+            return root;
+        } catch (Exception e)
+        {
             log.fatal(OWBLogConst.FATAL_0002, e);
             throw new WebBeansException(log.getTokenString(OWBLogConst.EXCEPT_0013), e);
-    	}
+        }
     }
     
     /**
@@ -150,27 +150,27 @@ public class XMLUtil {
      */
     public static Element getSpecStrictRootElement(InputStream stream) throws WebBeansException
     {
-    	try 
-    	{
-	    	DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
-			factory.setCoalescing(false);
-			factory.setExpandEntityReferences(true);
-			factory.setIgnoringComments(true);
-			factory.setIgnoringElementContentWhitespace(true);
-			factory.setNamespaceAware(true);
-			factory.setValidating(false);
-			DocumentBuilder documentBuilder = factory.newDocumentBuilder();
-			documentBuilder.setErrorHandler(new WebBeansErrorHandler());
-			documentBuilder.setEntityResolver(new WebBeansResolver());
-	    	
-			Element root = documentBuilder.parse(stream).getDocumentElement();
-			return root;
-    	} catch (Exception e)
-    	{
+        try
+        {
+            DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+            factory.setCoalescing(false);
+            factory.setExpandEntityReferences(true);
+            factory.setIgnoringComments(true);
+            factory.setIgnoringElementContentWhitespace(true);
+            factory.setNamespaceAware(true);
+            factory.setValidating(false);
+            DocumentBuilder documentBuilder = factory.newDocumentBuilder();
+            documentBuilder.setErrorHandler(new WebBeansErrorHandler());
+            documentBuilder.setEntityResolver(new WebBeansResolver());
+
+            Element root = documentBuilder.parse(stream).getDocumentElement();
+            return root;
+        } catch (Exception e)
+        {
             log.fatal(OWBLogConst.FATAL_0002, e);
             throw new WebBeansException(log.getTokenString(OWBLogConst.EXCEPT_0013), e);
-    	}    	
-    }    
+        }
+    }
 
     public static boolean isElementInNamespace(Element element, String namespace)
     {
@@ -380,9 +380,9 @@ public class XMLUtil {
         NodeList ns = element.getChildNodes();
         for(int i=0; i<ns.getLength(); i++)
         {
-        	node = ns.item(i);
-        	if (!(node instanceof Element)) continue;
-        	child = (Element)node;
+            node = ns.item(i);
+            if (!(node instanceof Element)) continue;
+            child = (Element)node;
             if (!isElementInWebBeansNameSpaceWithName(child, WebBeansConstants.WEB_BEANS_XML_INITIALIZER_ELEMENT) && !isElementInWebBeansNameSpaceWithName(child, WebBeansConstants.WEB_BEANS_XML_DESTRUCTOR_ELEMENT) && !isElementInWebBeansNameSpaceWithName(child, WebBeansConstants.WEB_BEANS_XML_PRODUCES_ELEMENT) && !isElementInWebBeansNameSpaceWithName(child, WebBeansConstants.WEB_BEANS_XML_DISPOSES_ELEMENT) && !isElementInWebBeansNameSpaceWithName(child, WebBeansConstants.WEB_BEANS_XML_OBSERVES_ELEMENT) && !isElementInWebBeansNameSpaceWithName(child, WebBeansConstants.WEB_BEANS_XML_DECORATES_ELEMENT))
             {
 
@@ -420,15 +420,15 @@ public class XMLUtil {
      */
     public static boolean isElementMethod(Element element)
     {
-    	nullCheckForElement(element);
+        nullCheckForElement(element);
 
         Node node; Element child;
         NodeList ns = element.getChildNodes();
         for(int i=0; i<ns.getLength(); i++)
         {
-        	node = ns.item(i);
-        	if (!(node instanceof Element)) continue;
-        	child = (Element)node;
+            node = ns.item(i);
+            if (!(node instanceof Element)) continue;
+            child = (Element)node;
             if (isElementInWebBeansNameSpaceWithName(child, WebBeansConstants.WEB_BEANS_XML_INITIALIZER_ELEMENT) || isElementInWebBeansNameSpaceWithName(child, WebBeansConstants.WEB_BEANS_XML_DESTRUCTOR_ELEMENT) || isElementInWebBeansNameSpaceWithName(child, WebBeansConstants.WEB_BEANS_XML_PRODUCES_ELEMENT) || isElementInWebBeansNameSpaceWithName(child, WebBeansConstants.WEB_BEANS_XML_DISPOSES_ELEMENT) || isElementInWebBeansNameSpaceWithName(child, WebBeansConstants.WEB_BEANS_XML_OBSERVES_ELEMENT))
             {
                 return true;
@@ -549,14 +549,14 @@ public class XMLUtil {
         NodeList nl = parent.getChildNodes();
         for(int i=0; i<nl.getLength(); i++)
         {
-        	node = nl.item(i);
-        	if (node instanceof Element) 
-        	{
-	        	if (node.getNodeName().equals(childName)) 
-	        	{
-	        		child = (Element)node;
-	        	}
-        	}
+            node = nl.item(i);
+            if (node instanceof Element)
+            {
+                if (node.getNodeName().equals(childName))
+                {
+                    child = (Element)node;
+                }
+            }
         }
         
         if (child == null)
@@ -627,10 +627,10 @@ public class XMLUtil {
             NodeList ns = typeElement.getChildNodes();
             for(int i=0; i<ns.getLength(); i++)
             {
-            	node = ns.item(i);
-            	if (!(node instanceof Element)) continue;
-            	childElement = (Element)node;
-            	Type actualType = getElementJavaType(childElement);
+                node = ns.item(i);
+                if (!(node instanceof Element)) continue;
+                childElement = (Element)node;
+                Type actualType = getElementJavaType(childElement);
                 if (actualType == null)
                 {
                     throw new NonexistentTypeException(errorMessage + log.getTokenString(OWBLogConst.TEXT_JAVA_TYPENAME) + getElementJavaClassName(typeElement) + " is not found in the deployment");
@@ -722,7 +722,7 @@ public class XMLUtil {
         
         for(int i=0; i<attrs.getLength(); i++)
         {
-        	Attr attr = (Attr)attrs.item(i);
+            Attr attr = (Attr)attrs.item(i);
             attrsNames.add(attr.getName());
         }
 



Mime
View raw message