camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject [2/2] camel git commit: Cleaned up some eclipse warnings of camel-cdi
Date Fri, 07 Nov 2014 09:24:38 GMT
Cleaned up some eclipse warnings of camel-cdi


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/e6347abe
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/e6347abe
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/e6347abe

Branch: refs/heads/master
Commit: e6347abe8a9e9c1b73bf6336992e2f6253257a58
Parents: 6c68389
Author: Willem Jiang <willem.jiang@gmail.com>
Authored: Fri Nov 7 16:10:15 2014 +0800
Committer: Willem Jiang <willem.jiang@gmail.com>
Committed: Fri Nov 7 16:10:15 2014 +0800

----------------------------------------------------------------------
 .../org/apache/camel/cdi/internal/CamelContextBean.java |  1 -
 .../org/apache/camel/cdi/internal/CamelExtension.java   | 12 ++++++------
 2 files changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/e6347abe/components/camel-cdi/src/main/java/org/apache/camel/cdi/internal/CamelContextBean.java
----------------------------------------------------------------------
diff --git a/components/camel-cdi/src/main/java/org/apache/camel/cdi/internal/CamelContextBean.java
b/components/camel-cdi/src/main/java/org/apache/camel/cdi/internal/CamelContextBean.java
index abb51d2..3dc34f9 100644
--- a/components/camel-cdi/src/main/java/org/apache/camel/cdi/internal/CamelContextBean.java
+++ b/components/camel-cdi/src/main/java/org/apache/camel/cdi/internal/CamelContextBean.java
@@ -38,7 +38,6 @@ import org.apache.deltaspike.core.api.literal.DefaultLiteral;
 /**
  * Description of camel context bean.
  */
-@SuppressWarnings("unchecked")
 public class CamelContextBean implements Bean<CdiCamelContext>, BeanAttributes<CdiCamelContext>
{
 
     private final BeanManager beanManager;

http://git-wip-us.apache.org/repos/asf/camel/blob/e6347abe/components/camel-cdi/src/main/java/org/apache/camel/cdi/internal/CamelExtension.java
----------------------------------------------------------------------
diff --git a/components/camel-cdi/src/main/java/org/apache/camel/cdi/internal/CamelExtension.java
b/components/camel-cdi/src/main/java/org/apache/camel/cdi/internal/CamelExtension.java
index 47a5ffa..7ac19b9 100644
--- a/components/camel-cdi/src/main/java/org/apache/camel/cdi/internal/CamelExtension.java
+++ b/components/camel-cdi/src/main/java/org/apache/camel/cdi/internal/CamelExtension.java
@@ -64,7 +64,7 @@ import org.apache.deltaspike.core.util.metadata.builder.AnnotatedTypeBuilder;
  */
 public class CamelExtension implements Extension {
 
-    private static class InjectLiteral extends AnnotationLiteral<Inject> implements
Inject {
+    private static class InjectLiteral extends AnnotationLiteral<Inject> {
         private static final long serialVersionUID = 1L;
     }
 
@@ -96,11 +96,11 @@ public class CamelExtension implements Extension {
      * @param process Annotated type.
      * @throws Exception In case of exceptions.
      */
-    protected void contextAwareness(@Observes ProcessAnnotatedType<? extends CamelContextAware>
process) throws Exception {
-        AnnotatedType at = process.getAnnotatedType();
+    protected void contextAwareness(@Observes ProcessAnnotatedType<CamelContextAware>
process) throws Exception {
+        AnnotatedType<CamelContextAware> at = process.getAnnotatedType();
 
         Method method = at.getJavaClass().getMethod("setCamelContext", CamelContext.class);
-        AnnotatedTypeBuilder builder = new AnnotatedTypeBuilder<CamelContextAware>()
+        AnnotatedTypeBuilder<CamelContextAware> builder = new AnnotatedTypeBuilder<CamelContextAware>()
                 .readFromType(at)
                 .addToMethod(method, new InjectLiteral());
         process.setAnnotatedType(builder.create());
@@ -108,9 +108,9 @@ public class CamelExtension implements Extension {
     }
 
     protected  void detectRouteBuilders(@Observes ProcessAnnotatedType<?> process)
throws Exception {
-        AnnotatedType annotatedType = process.getAnnotatedType();
+        AnnotatedType<?> annotatedType = process.getAnnotatedType();
         ContextName annotation = annotatedType.getAnnotation(ContextName.class);
-        Class javaClass = annotatedType.getJavaClass();
+        Class<?> javaClass = annotatedType.getJavaClass();
         if (annotation != null && isRoutesBean(javaClass)) {
             addRouteBuilderBean(annotatedType, annotation);
         }


Mime
View raw message