You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwebbeans.apache.org by st...@apache.org on 2010/06/09 08:47:07 UTC
svn commit: r952914 - in
/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans: event/
intercept/ intercept/webbeans/ jms/ portable/ portable/events/ proxy/ util/
Author: struberg
Date: Wed Jun 9 06:47:06 2010
New Revision: 952914
URL: http://svn.apache.org/viewvc?rev=952914&view=rev
Log:
OWB-275 code cleanup
Modified:
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/EventUtil.java
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/NotificationManager.java
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorUtil.java
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorsManager.java
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/WebBeansInterceptorConfig.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/jms/JMSManager.java
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/jms/JMSModel.java
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/AnnotatedElementFactory.java
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/ProcessSessionBeanImpl.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/ClassUtil.java
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/JNDIUtil.java
Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/EventUtil.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/EventUtil.java?rev=952914&r1=952913&r2=952914&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/EventUtil.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/EventUtil.java Wed Jun 9 06:47:06 2010
@@ -169,22 +169,7 @@ public final class EventUtil
}
else
{
- if(typeArgs.length == 1)
- {
- //TCK does not check those! Also specification not talk about them.
-// Type actualArgument = typeArgs[0];
-//
-// if(ClassUtil.isParametrizedType(actualArgument) || ClassUtil.isWildCardType(actualArgument) || ClassUtil.isTypeVariable(actualArgument))
-// {
-// throw new IllegalArgumentException("@Observable field injection " + injectionPoint.toString() + " actual type argument can not be Parametrized, Wildcard type or Type variable");
-// }
-//
-// if(ClassUtil.isDefinitionConstainsTypeVariables((Class<?>)actualArgument))
-// {
-// throw new IllegalArgumentException("@Observable field injection " + injectionPoint.toString() + " must not have TypeVariable or WildCard generic type argument");
-// }
- }
- else
+ if(typeArgs.length != 1)
{
throw new IllegalArgumentException("@Observable field injection " + injectionPoint.toString()
+ " must not have more than one actual type argument");
Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/NotificationManager.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/NotificationManager.java?rev=952914&r1=952913&r2=952914&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/NotificationManager.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/NotificationManager.java Wed Jun 9 06:47:06 2010
@@ -336,7 +336,8 @@ public final class NotificationManager
}
- private <T> void addToMathingWithParametrizedForProducers(boolean isObserverMethod,Type type, Class<?> beanClass, Class<?> producerOrObserverReturnClass, Set<ObserverMethod<? super T>> matching )
+ private <T> void addToMathingWithParametrizedForProducers(boolean isObserverMethod,Type type, Class<?> beanClass,
+ Class<?> producerOrObserverReturnClass, Set<ObserverMethod<? super T>> matching )
{
ParameterizedType pt = (ParameterizedType)type;
Type[] actualArgs = pt.getActualTypeArguments();
Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorUtil.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorUtil.java?rev=952914&r1=952913&r2=952914&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorUtil.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorUtil.java Wed Jun 9 06:47:06 2010
@@ -75,12 +75,16 @@ public final class InterceptorUtil
return false;
}
- if (AnnotationUtil.hasMethodAnnotation(method, PreDestroy.class) || AnnotationUtil.hasMethodAnnotation(method, PostConstruct.class) || AnnotationUtil.hasMethodAnnotation(method, AroundInvoke.class))
+ if (AnnotationUtil.hasMethodAnnotation(method, PreDestroy.class)
+ || AnnotationUtil.hasMethodAnnotation(method, PostConstruct.class)
+ || AnnotationUtil.hasMethodAnnotation(method, AroundInvoke.class))
{
return false;
}
- if (AnnotationUtil.hasMethodAnnotation(method, Produces.class) || AnnotationUtil.hasMethodParameterAnnotation(method, Disposes.class) || AnnotationUtil.hasMethodParameterAnnotation(method, Observes.class))
+ if (AnnotationUtil.hasMethodAnnotation(method, Produces.class)
+ || AnnotationUtil.hasMethodParameterAnnotation(method, Disposes.class)
+ || AnnotationUtil.hasMethodParameterAnnotation(method, Observes.class))
{
return true;
}
@@ -275,7 +279,9 @@ public final class InterceptorUtil
{
if(methodA.isAnnotationPresent(Produces.class))
{
- throw new WebBeansConfigurationException("Interceptor class : " + annotatedType.getJavaClass().getName() + " can not have producer methods but it has one with name : " + methodA.getJavaMember().getName());
+ throw new WebBeansConfigurationException("Interceptor class : " + annotatedType.getJavaClass().getName()
+ + " can not have producer methods but it has one with name : "
+ + methodA.getJavaMember().getName());
}
}
@@ -283,10 +289,12 @@ public final class InterceptorUtil
Annotation[] anns = annotatedType.getAnnotations().toArray(new Annotation[0]);
if (!AnnotationUtil.hasInterceptorBindingMetaAnnotation(anns))
{
- throw new WebBeansConfigurationException("Interceptor class : " + annotatedType.getJavaClass().getName() + " must have at least one @InterceptorBinding annotation");
+ throw new WebBeansConfigurationException("Interceptor class : " + annotatedType.getJavaClass().getName()
+ + " must have at least one @InterceptorBinding annotation");
}
- checkLifecycleConditions(annotatedType, anns, "Lifecycle interceptor : " + annotatedType.getJavaClass().getName() + " interceptor binding type must be defined as @Target{TYPE}");
+ checkLifecycleConditions(annotatedType, anns, "Lifecycle interceptor : " + annotatedType.getJavaClass().getName()
+ + " interceptor binding type must be defined as @Target{TYPE}");
}
@@ -299,16 +307,19 @@ public final class InterceptorUtil
{
if(AnnotationUtil.hasMethodAnnotation(method, Produces.class))
{
- throw new WebBeansConfigurationException("Interceptor class : " + clazz + " can not have producer methods but it has one with name : " + method.getName());
+ throw new WebBeansConfigurationException("Interceptor class : " + clazz + " can not have producer methods but it has one with name : "
+ + method.getName());
}
}
if (!AnnotationUtil.hasInterceptorBindingMetaAnnotation(clazz.getDeclaredAnnotations()))
{
- throw new WebBeansConfigurationException("WebBeans Interceptor class : " + clazz.getName() + " must have at least one @InterceptorBinding annotation");
+ throw new WebBeansConfigurationException("WebBeans Interceptor class : " + clazz.getName()
+ + " must have at least one @InterceptorBinding annotation");
}
- checkLifecycleConditions(clazz, clazz.getDeclaredAnnotations(), "Lifecycle interceptor : " + clazz.getName() + " interceptor binding type must be defined as @Target{TYPE}");
+ checkLifecycleConditions(clazz, clazz.getDeclaredAnnotations(), "Lifecycle interceptor : " + clazz.getName()
+ + " interceptor binding type must be defined as @Target{TYPE}");
}
public static <T> void checkLifecycleConditions(Class<T> clazz, Annotation[] annots, String errorMessage)
@@ -392,13 +403,17 @@ public final class InterceptorUtil
{
if (hasClassInterceptors)
{
- throw new WebBeansConfigurationException("Simple web bean class : " + clazz.getName() + " can not define non-static, non-private final methods. Because it is annotated with at least one @InterceptorBinding");
+ throw new WebBeansConfigurationException("Simple web bean class : " + clazz.getName()
+ + " can not define non-static, non-private final methods. Because it is annotated with at least one @InterceptorBinding");
}
else
{
if (AnnotationUtil.hasInterceptorBindingMetaAnnotation(method.getDeclaredAnnotations()))
{
- throw new WebBeansConfigurationException("Method : " + method.getName() + "in simple web bean class : " + clazz.getName() + " can not be defined as non-static, non-private and final . Because it is annotated with at least one @InterceptorBinding");
+ throw new WebBeansConfigurationException("Method : " + method.getName() + "in simple web bean class : "
+ + clazz.getName()
+ + " can not be defined as non-static, non-private and final. "
+ + "Because it is annotated with at least one @InterceptorBinding");
}
}
}
Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorsManager.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorsManager.java?rev=952914&r1=952913&r2=952914&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorsManager.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorsManager.java Wed Jun 9 06:47:06 2010
@@ -63,15 +63,22 @@ public class InterceptorsManager
if (srcIndex == -1 || targetIndex == -1)
{
- throw new IllegalArgumentException("One of the compare class of the list : [" + src.getName() + "," + target.getName() + "]" + " is not contained in the enabled interceptors list!");
+ throw new IllegalArgumentException("One of the compare class of the list : [" + src.getName() + "," + target.getName() + "]"
+ + " is not contained in the enabled interceptors list!");
}
if (srcIndex == targetIndex)
+ {
return 0;
+ }
else if (srcIndex < targetIndex)
+ {
return -1;
+ }
else
+ {
return 1;
+ }
}
public boolean isInterceptorEnabled(Class<?> interceptorClazz)
Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/WebBeansInterceptorConfig.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/WebBeansInterceptorConfig.java?rev=952914&r1=952913&r2=952914&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/WebBeansInterceptorConfig.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/WebBeansInterceptorConfig.java Wed Jun 9 06:47:06 2010
@@ -88,7 +88,8 @@ public final class WebBeansInterceptorCo
{
if(logger.wblWillLogWarn())
{
- logger.warn(OWBLogConst.WARN_0005_2, delegate.getBeanClass().getName()); }
+ logger.warn(OWBLogConst.WARN_0005_2, delegate.getBeanClass().getName());
+ }
}
if(delegate.isAlternative())
@@ -194,9 +195,9 @@ public final class WebBeansInterceptorCo
Set<Annotation> inheritedBindingTypes = metadata.getInheritedInterceptorBindings();
if (!inheritedBindingTypes.isEmpty())
{
- Annotation[] inherited_anns = new Annotation[inheritedBindingTypes.size()];
- inherited_anns = inheritedBindingTypes.toArray(inherited_anns);
- anns = AnnotationUtil.getInterceptorBindingMetaAnnotations(inherited_anns);
+ Annotation[] inheritedAnns = new Annotation[inheritedBindingTypes.size()];
+ inheritedAnns = inheritedBindingTypes.toArray(inheritedAnns);
+ anns = AnnotationUtil.getInterceptorBindingMetaAnnotations(inheritedAnns);
bindingTypeSet.addAll(Arrays.asList(anns));
}
@@ -210,9 +211,9 @@ public final class WebBeansInterceptorCo
// of stereotypes we've found
Annotation[] inherited = new Annotation[inheritedStereotypes.size()];
inherited = inheritedStereotypes.toArray(inherited);
- Annotation[] transitive_stereotypes = AnnotationUtil.getStereotypeMetaAnnotations(inherited);
+ Annotation[] transitiveStereotypes = AnnotationUtil.getStereotypeMetaAnnotations(inherited);
- for (Annotation stereo : transitive_stereotypes)
+ for (Annotation stereo : transitiveStereotypes)
{
if (AnnotationUtil.hasInterceptorBindingMetaAnnotation(stereo.annotationType().getDeclaredAnnotations()))
{
@@ -265,8 +266,8 @@ public final class WebBeansInterceptorCo
{
WebBeansInterceptor<?> interceptor = (WebBeansInterceptor<?>) it.next();
- AnnotatedType<?> annotatedType = null;
- if((annotatedType = interceptor.getAnnotatedType()) != null)
+ AnnotatedType<?> annotatedType = interceptor.getAnnotatedType();
+ if(annotatedType != null)
{
// interceptor binding
WebBeansUtil.configureInterceptorMethods(interceptor, annotatedType, AroundInvoke.class, true, false, stack, null);
@@ -291,7 +292,8 @@ public final class WebBeansInterceptorCo
* @param componentInterceptors the configured interceptors from the component level
* @param resolvedComponentInterceptorBindings complete (including transitive) set of component-level interceptor bindings
*/
- private static void addMethodInterceptors(Class<?> clazz, List<InterceptorData> stack, Set<Interceptor<?>> componentInterceptors, Set<Annotation> resolvedComponentInterceptorBindings)
+ private static void addMethodInterceptors(Class<?> clazz, List<InterceptorData> stack, Set<Interceptor<?>> componentInterceptors,
+ Set<Annotation> resolvedComponentInterceptorBindings)
{
// All methods, not just those declared
Method[] methods = clazz.getMethods();
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=952914&r1=952913&r2=952914&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 Wed Jun 9 06:47:06 2010
@@ -122,7 +122,9 @@ public class WebBeansInterceptor<T> exte
{
if (!AnnotationUtil.hasAnnotation(method.getAnnotations(), Nonbinding.class))
{
- throw new WebBeansConfigurationException("Interceptor definition class : " + getClazz().getName() + " @InterceptorBinding : " + binding.getName() + " must have @NonBinding valued members for its array-valued and annotation valued members");
+ throw new WebBeansConfigurationException("Interceptor definition class : " + getClazz().getName() + " @InterceptorBinding : "
+ + binding.getName()
+ + " must have @NonBinding valued members for its array-valued and annotation valued members");
}
}
}
Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/jms/JMSManager.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/jms/JMSManager.java?rev=952914&r1=952913&r2=952914&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/jms/JMSManager.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/jms/JMSManager.java Wed Jun 9 06:47:06 2010
@@ -53,7 +53,8 @@ public class JMSManager
{
Iterator<JMSModel> models = this.jmsModels.iterator();
- while(models.hasNext()){
+ while(models.hasNext())
+ {
JMSModel model = models.next();
Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/jms/JMSModel.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/jms/JMSModel.java?rev=952914&r1=952913&r2=952914&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/jms/JMSModel.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/jms/JMSModel.java Wed Jun 9 06:47:06 2010
@@ -24,7 +24,8 @@ import java.util.Set;
public class JMSModel
{
- public enum JMSType{
+ public enum JMSType
+ {
QUEUE,
TOPIC
}
@@ -118,26 +119,40 @@ public class JMSModel
public boolean equals(Object obj)
{
if (this == obj)
+ {
return true;
+ }
if (obj == null)
+ {
return false;
+ }
if (getClass() != obj.getClass())
+ {
return false;
+ }
JMSModel other = (JMSModel) obj;
if (bindings == null)
{
if (other.bindings != null)
+ {
return false;
+ }
}
else if (!bindings.equals(other.bindings))
+ {
return false;
+ }
if (jmsType == null)
{
if (other.jmsType != null)
+ {
return false;
+ }
}
else if (!jmsType.equals(other.jmsType))
+ {
return false;
+ }
return true;
}
Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/AnnotatedElementFactory.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/AnnotatedElementFactory.java?rev=952914&r1=952913&r2=952914&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/AnnotatedElementFactory.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/AnnotatedElementFactory.java Wed Jun 9 06:47:06 2010
@@ -24,7 +24,6 @@ import java.lang.reflect.Method;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
-import javax.enterprise.inject.spi.Annotated;
import javax.enterprise.inject.spi.AnnotatedConstructor;
import javax.enterprise.inject.spi.AnnotatedField;
import javax.enterprise.inject.spi.AnnotatedMethod;
@@ -34,7 +33,7 @@ import org.apache.webbeans.util.Asserts;
import org.apache.webbeans.util.SecurityUtil;
/**
- * Factory for {@link Annotated} elements.
+ * Factory for {@link javax.enterprise.inject.spi.Annotated} elements.
*
* @version $Rev$ $Date$
*/
@@ -183,7 +182,7 @@ public final class AnnotatedElementFacto
*
* @param <X> declaring class
* @param method annotated method
- * @param declaringClass declaring class info
+ * @param declaringType declaring class info
* @return new annotated method
*/
@SuppressWarnings("unchecked")
Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/ProcessSessionBeanImpl.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/ProcessSessionBeanImpl.java?rev=952914&r1=952913&r2=952914&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/ProcessSessionBeanImpl.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/ProcessSessionBeanImpl.java Wed Jun 9 06:47:06 2010
@@ -72,7 +72,8 @@ public class ProcessSessionBeanImpl<X> e
* {@inheritDoc}
*/
@Override
- public AnnotatedType<Object> getAnnotatedBeanClass() {
+ public AnnotatedType<Object> getAnnotatedBeanClass()
+ {
return annotatedBeanClass;
}
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=952914&r1=952913&r2=952914&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 Wed Jun 9 06:47:06 2010
@@ -100,7 +100,8 @@ public final class JavassistProxyFactory
return clazz;
}
- public static Class<?> createAbstractDecoratorProxyClass(OwbBean<?> bean){
+ public static Class<?> createAbstractDecoratorProxyClass(OwbBean<?> bean)
+ {
//Will only get called once while defining the bean, so no need to cache
Class<?> clazz = null;
try
@@ -136,7 +137,8 @@ public final class JavassistProxyFactory
if (!(bean instanceof WebBeansDecorator<?>) && !(bean instanceof WebBeansInterceptor<?>))
{
- if (bean.getScope().equals(ApplicationScoped.class)){
+ if (bean.getScope().equals(ApplicationScoped.class))
+ {
((ProxyObject)result).setHandler(new ApplicationScopedBeanIntereptorHandler(bean, creationalContext));
}
else
@@ -247,7 +249,8 @@ public final class JavassistProxyFactory
{
proxyClass = SecurityUtil.doPrivilegedCreateClass(factory);
- }catch(Exception e)
+ }
+ catch(Exception e)
{
ProxyFactory.classLoaderProvider = new ProxyFactory.ClassLoaderProvider(){
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=952914&r1=952913&r2=952914&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 Wed Jun 9 06:47:06 2010
@@ -600,7 +600,10 @@ public final class AnnotationUtil
private static boolean checkEquality(String src, String member, List<String> arguments)
{
if ((checkEquBuffer(src, arguments).toString().trim().equals(checkEquBuffer(member, arguments).toString().trim())))
+ {
return true;
+ }
+
return false;
}
@@ -670,7 +673,7 @@ public final class AnnotationUtil
//Add the default qualifier if no others exist. Section 3.10, OWB-142///
if(set.size() == 0)
{
- set.add(new DefaultLiteral());
+ set.add(new DefaultLiteral());
}
////////////////////////////////////////////////////////////////////////
@@ -883,7 +886,8 @@ public final class AnnotationUtil
}
}
- private static void checkQualifierConditions(Annotation ann) {
+ private static void checkQualifierConditions(Annotation ann)
+ {
Method[] methods = SecurityUtil.doPrivilegedGetDeclaredMethods(ann.annotationType());
for (Method method : methods)
@@ -893,7 +897,8 @@ public final class AnnotationUtil
{
if (!AnnotationUtil.hasAnnotation(method.getDeclaredAnnotations(), Nonbinding.class))
{
- throw new WebBeansConfigurationException("@Qualifier : " + ann.annotationType().getName() + " must have @NonBinding valued members for its array-valued and annotation valued members");
+ throw new WebBeansConfigurationException("@Qualifier : " + ann.annotationType().getName()
+ + " must have @NonBinding valued members for its array-valued and annotation valued members");
}
}
}
Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java?rev=952914&r1=952913&r2=952914&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/ClassUtil.java Wed Jun 9 06:47:06 2010
@@ -491,7 +491,9 @@ public final class ClassUtil
if (et.length == 1)
{
if (et[0].equals(Exception.class))
+ {
return true;
+ }
}
return false;
@@ -775,7 +777,7 @@ public final class ClassUtil
try
{
- SecurityUtil.doPrivilegedGetDeclaredConstructor(clazz, new Class<?>[] {});
+ SecurityUtil.doPrivilegedGetDeclaredConstructor(clazz, new Class<?>[] {});
}
catch (SecurityException e)
{
@@ -1264,9 +1266,7 @@ public final class ClassUtil
Asserts.assertNotNull(fieldName, "fieldName parameter can not be null");
try
{
-
- SecurityUtil.doPrivilegedGetDeclaredField(clazz, fieldName);
-
+ SecurityUtil.doPrivilegedGetDeclaredField(clazz, fieldName);
}
catch (SecurityException e)
{
@@ -2041,7 +2041,8 @@ public final class ClassUtil
{
return SecurityUtil.doPrivilegedGetDeclaredMethod(clazz,methodName, parameters);
- }catch(NoSuchMethodException e)
+ }
+ catch(NoSuchMethodException e)
{
return null;
}
@@ -2053,7 +2054,8 @@ public final class ClassUtil
{
return clazz.getConstructor(parameterTypes);
- }catch(NoSuchMethodException e)
+ }
+ catch(NoSuchMethodException e)
{
return null;
}
Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/JNDIUtil.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/JNDIUtil.java?rev=952914&r1=952913&r2=952914&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/JNDIUtil.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/JNDIUtil.java Wed Jun 9 06:47:06 2010
@@ -78,7 +78,8 @@ public final class JNDIUtil
{
context = (Context)initialContext.lookup(parts[i]);
- }catch(NameNotFoundException e)
+ }
+ catch(NameNotFoundException e)
{
context = initialContext.createSubcontext(parts[i]);
}
@@ -117,7 +118,8 @@ public final class JNDIUtil
try
{
return (T) initialContext.lookup(name);
- } catch (NamingException e)
+ }
+ catch (NamingException e)
{
LOGGER.error(e);
throw new WebBeansException(LOGGER.getTokenString(OWBLogConst.EXCEPT_0010) + name, e);