camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1212415 - in /camel/branches/camel-2.8.x: ./ components/camel-spring/src/main/java/org/apache/camel/spring/handler/ErrorHandlerDefinitionParser.java
Date Fri, 09 Dec 2011 13:38:56 GMT
Author: davsclaus
Date: Fri Dec  9 13:38:55 2011
New Revision: 1212415

URL: http://svn.apache.org/viewvc?rev=1212415&view=rev
Log:
CAMEL-4760: Spring DSL. Improved error handler XML namespace parser to only accept logName
and level options for the logging error handler.

Modified:
    camel/branches/camel-2.8.x/   (props changed)
    camel/branches/camel-2.8.x/components/camel-spring/src/main/java/org/apache/camel/spring/handler/ErrorHandlerDefinitionParser.java

Propchange: camel/branches/camel-2.8.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Dec  9 13:38:55 2011
@@ -1 +1 @@
-/camel/trunk:1202148,1202167,1202204-1202206,1202215,1202223,1202659,1202685,1203879,1203978,1204338,1205124,1205372,1205412,1205429,1205431,1205713,1206116,1206414,1207743,1207784,1208301,1208930,1208964-1208965,1209006-1209007,1209382,1209401,1209477,1209845-1209846,1210113,1210771,1210830,1211363,1211414,1211773,1211811,1212275
+/camel/trunk:1202148,1202167,1202204-1202206,1202215,1202223,1202659,1202685,1203879,1203978,1204338,1205124,1205372,1205412,1205429,1205431,1205713,1206116,1206414,1207743,1207784,1208301,1208930,1208964-1208965,1209006-1209007,1209382,1209401,1209477,1209845-1209846,1210113,1210771,1210830,1211363,1211414,1211773,1211811,1212275,1212408

Propchange: camel/branches/camel-2.8.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: camel/branches/camel-2.8.x/components/camel-spring/src/main/java/org/apache/camel/spring/handler/ErrorHandlerDefinitionParser.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.8.x/components/camel-spring/src/main/java/org/apache/camel/spring/handler/ErrorHandlerDefinitionParser.java?rev=1212415&r1=1212414&r2=1212415&view=diff
==============================================================================
--- camel/branches/camel-2.8.x/components/camel-spring/src/main/java/org/apache/camel/spring/handler/ErrorHandlerDefinitionParser.java
(original)
+++ camel/branches/camel-2.8.x/components/camel-spring/src/main/java/org/apache/camel/spring/handler/ErrorHandlerDefinitionParser.java
Fri Dec  9 13:38:55 2011
@@ -150,6 +150,16 @@ public class ErrorHandlerDefinitionParse
             throw new IllegalArgumentException("Attribute executorServiceRef is not supported
by error handler type: "
                     + type.name() + ", in error handler with id: " + id);
         }
+        String logName = element.getAttribute("logName");
+        if (ObjectHelper.isNotEmpty(logName) && (!type.equals(ErrorHandlerType.LoggingErrorHandler)))
{
+            throw new IllegalArgumentException("Attribute logName is not supported by error
handler type: "
+                    + type.name() + ", in error handler with id: " + id);
+        }
+        String level = element.getAttribute("level");
+        if (ObjectHelper.isNotEmpty(level) && (!type.equals(ErrorHandlerType.LoggingErrorHandler)))
{
+            throw new IllegalArgumentException("Attribute level is not supported by error
handler type: "
+                    + type.name() + ", in error handler with id: " + id);
+        }
     }
 
     private void parserRefAttribute(Element element, String attributeName, String propertyName,
BeanDefinitionBuilder builder) {



Mime
View raw message