camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [2/8] camel git commit: Make camel apt compiler plugin roboust in case of weird error
Date Thu, 17 Dec 2015 07:37:52 GMT
Make camel apt compiler plugin roboust in case of weird error


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

Branch: refs/heads/master
Commit: d16230254ec67cf02cc8182daba56ee7c6b4602c
Parents: 8f37aa8
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Thu Dec 17 08:03:27 2015 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Thu Dec 17 08:03:27 2015 +0100

----------------------------------------------------------------------
 .../camel/tools/apt/EipAnnotationProcessor.java   | 18 +++++++++++-------
 .../tools/apt/EndpointAnnotationProcessor.java    | 18 +++++++++++-------
 2 files changed, 22 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/d1623025/tooling/apt/src/main/java/org/apache/camel/tools/apt/EipAnnotationProcessor.java
----------------------------------------------------------------------
diff --git a/tooling/apt/src/main/java/org/apache/camel/tools/apt/EipAnnotationProcessor.java
b/tooling/apt/src/main/java/org/apache/camel/tools/apt/EipAnnotationProcessor.java
index bab6360..d124e39 100644
--- a/tooling/apt/src/main/java/org/apache/camel/tools/apt/EipAnnotationProcessor.java
+++ b/tooling/apt/src/main/java/org/apache/camel/tools/apt/EipAnnotationProcessor.java
@@ -90,15 +90,19 @@ public class EipAnnotationProcessor extends AbstractAnnotationProcessor
{
 
     @Override
     public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment
roundEnv) {
-        if (roundEnv.processingOver()) {
-            return true;
-        }
+        try {
+            if (roundEnv.processingOver()) {
+                return true;
+            }
 
-        Set<? extends Element> elements = roundEnv.getElementsAnnotatedWith(XmlRootElement.class);
-        for (Element element : elements) {
-            if (element instanceof TypeElement) {
-                processModelClass(roundEnv, (TypeElement) element);
+            Set<? extends Element> elements = roundEnv.getElementsAnnotatedWith(XmlRootElement.class);
+            for (Element element : elements) {
+                if (element instanceof TypeElement) {
+                    processModelClass(roundEnv, (TypeElement) element);
+                }
             }
+        } catch (Throwable e) {
+            // ignore
         }
         return true;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/d1623025/tooling/apt/src/main/java/org/apache/camel/tools/apt/EndpointAnnotationProcessor.java
----------------------------------------------------------------------
diff --git a/tooling/apt/src/main/java/org/apache/camel/tools/apt/EndpointAnnotationProcessor.java
b/tooling/apt/src/main/java/org/apache/camel/tools/apt/EndpointAnnotationProcessor.java
index 0f26084..d7c6249 100644
--- a/tooling/apt/src/main/java/org/apache/camel/tools/apt/EndpointAnnotationProcessor.java
+++ b/tooling/apt/src/main/java/org/apache/camel/tools/apt/EndpointAnnotationProcessor.java
@@ -68,14 +68,18 @@ public class EndpointAnnotationProcessor extends AbstractAnnotationProcessor
{
     private static final String HEADER_FILTER_STRATEGY_JAVADOC = "To use a custom HeaderFilterStrategy
to filter header to and from Camel message.";
 
     public boolean process(Set<? extends TypeElement> annotations, final RoundEnvironment
roundEnv) {
-        if (roundEnv.processingOver()) {
-            return true;
-        }
-        Set<? extends Element> elements = roundEnv.getElementsAnnotatedWith(UriEndpoint.class);
-        for (Element element : elements) {
-            if (element instanceof TypeElement) {
-                processEndpointClass(roundEnv, (TypeElement) element);
+        try {
+            if (roundEnv.processingOver()) {
+                return true;
+            }
+            Set<? extends Element> elements = roundEnv.getElementsAnnotatedWith(UriEndpoint.class);
+            for (Element element : elements) {
+                if (element instanceof TypeElement) {
+                    processEndpointClass(roundEnv, (TypeElement) element);
+                }
             }
+        } catch (Throwable e) {
+            // ignore
         }
         return true;
     }


Mime
View raw message