openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1437757 - in /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans: annotation/ component/creation/ corespi/se/ inject/ intercept/ portable/ util/
Date Wed, 23 Jan 2013 21:46:28 GMT
Author: struberg
Date: Wed Jan 23 21:46:27 2013
New Revision: 1437757

URL: http://svn.apache.org/viewvc?rev=1437757&view=rev
Log:
OWB-344 remove superflous type arguments and casts

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/AnnotationManager.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/ProducerMethodProducerBuilder.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/corespi/se/DefaultContextsService.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/InjectableMethod.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorResolutionService.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorsManager.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/AnnotatedElementFactory.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/AnnotationManager.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/AnnotationManager.java?rev=1437757&r1=1437756&r2=1437757&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/AnnotationManager.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/annotation/AnnotationManager.java
Wed Jan 23 21:46:27 2013
@@ -556,7 +556,7 @@ public final class AnnotationManager
             return getStereotypeMetaAnnotations(anns);
         }
 
-        return Collections.<Class<? extends Annotation>>emptySet();
+        return Collections.emptySet();
     }
 
     /**

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/ProducerMethodProducerBuilder.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/ProducerMethodProducerBuilder.java?rev=1437757&r1=1437756&r2=1437757&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/ProducerMethodProducerBuilder.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/ProducerMethodProducerBuilder.java
Wed Jan 23 21:46:27 2013
@@ -63,7 +63,7 @@ public class ProducerMethodProducerBuild
         Set<Annotation> producerQualifiers = bean.getWebBeansContext().getAnnotationManager().getQualifierAnnotations(producerMethod.getAnnotations());
         if (producerQualifiers.size() == 1 && producerQualifiers.iterator().next().annotationType().equals(Default.class))
         {
-            producerQualifiers = Collections.<Annotation>emptySet();
+            producerQualifiers = Collections.emptySet();
         }
         Set<Annotation> producerQualifiersWithoutNamed = new HashSet<Annotation>();
         for (Annotation qualifier: producerQualifiers)
@@ -86,7 +86,7 @@ public class ProducerMethodProducerBuild
                         Set<Annotation> disposalQualifiers = bean.getWebBeansContext().getAnnotationManager().getQualifierAnnotations(annotatedParameter.getAnnotations());
                         if (disposalQualifiers.size() == 1 && disposalQualifiers.iterator().next().annotationType().equals(Default.class))
                         {
-                            disposalQualifiers = Collections.<Annotation>emptySet();
+                            disposalQualifiers = Collections.emptySet();
                         }
                         if (disposalQualifiers.size() == producerQualifiersToCompare.size()
- 1)
                         {

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/corespi/se/DefaultContextsService.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/corespi/se/DefaultContextsService.java?rev=1437757&r1=1437756&r2=1437757&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/corespi/se/DefaultContextsService.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/corespi/se/DefaultContextsService.java
Wed Jan 23 21:46:27 2013
@@ -159,7 +159,7 @@ public class DefaultContextsService exte
             }
             else if(scopeType.equals(ConversationScoped.class))
             {
-                startConversationContext((ConversationContext)startParameter);
+                startConversationContext(startParameter);
             }
             else if(scopeType.equals(Dependent.class))
             {

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/InjectableMethod.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/InjectableMethod.java?rev=1437757&r1=1437756&r2=1437757&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/InjectableMethod.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/InjectableMethod.java
Wed Jan 23 21:46:27 2013
@@ -119,7 +119,7 @@ public class InjectableMethod<T> extends
                             Object instance = inject(point);
                             InjectionResolver injectionResolver = getWebBeansContext().getBeanManagerImpl().getInjectionResolver();
 
-                            Bean<?> injectedBean = (Bean<?>) injectionResolver.getInjectionPointBean(point);
+                            Bean<?> injectedBean = injectionResolver.getInjectionPointBean(point);
                             if(injectedBean.getScope() == Dependent.class)
                             {
                                 dependentParameters.put(injectedBean, instance);

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorResolutionService.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorResolutionService.java?rev=1437757&r1=1437756&r2=1437757&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorResolutionService.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorResolutionService.java
Wed Jan 23 21:46:27 2013
@@ -122,7 +122,7 @@ public class InterceptorResolutionServic
         List<Decorator<?>> decorators = beanManager.resolveDecorators(beanTypes,
AnnotationUtil.asArray(qualifiers));
         if (decorators.size() == 0)
         {
-            decorators = Collections.<Decorator<?>>emptyList(); // less to store
+            decorators = Collections.emptyList(); // less to store
         }
 
         // pick up CDI interceptors from a class level

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=1437757&r1=1437756&r2=1437757&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 Jan 23 21:46:27 2013
@@ -236,7 +236,7 @@ public class InterceptorsManager
             OwbBean<?> owbBean = (OwbBean<?>)interceptor;
             if(owbBean.isPassivationCapable())
             {
-                beanManager.addPassivationInfo((OwbBean) interceptor);
+                beanManager.addPassivationInfo(interceptor);
             }
 
         }

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=1437757&r1=1437756&r2=1437757&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 Jan 23 21:46:27 2013
@@ -119,7 +119,7 @@ public final class AnnotatedElementFacto
                 AnnotatedType<? super X> supertype = null;
                 if (annotatedClass.getSuperclass() != null && !annotatedClass.getSuperclass().equals(Object.class))
                 {
-                    supertype = (AnnotatedTypeImpl<? super X>) newAnnotatedType(annotatedClass.getSuperclass());
+                    supertype = newAnnotatedType(annotatedClass.getSuperclass());
                 }
                 annotatedType = new AnnotatedTypeImpl<X>(webBeansContext, annotatedClass,
(AnnotatedTypeImpl<? super X>) supertype);
 

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java?rev=1437757&r1=1437756&r2=1437757&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
Wed Jan 23 21:46:27 2013
@@ -1115,7 +1115,7 @@ public final class WebBeansUtil
          if (component instanceof EnterpriseBeanMarker)
          {
              beans = new HashSet<Bean<?>>();
-             Set<Bean<?>> allBeans = ((BeanManagerImpl)(manager)).getBeans(Object.class,
AnnotationUtil.asArray(component.getQualifiers()));
+             Set<Bean<?>> allBeans = manager.getBeans(Object.class, AnnotationUtil.asArray(component.getQualifiers()));
 
              for(Bean<?> candidateBean : allBeans)
              {



Mime
View raw message