You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2019/04/22 11:41:16 UTC

[camel] branch master updated: Fixes CAMEL-13437: now also looking for constructor in superclasses.

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new 8a4f25a  Fixes CAMEL-13437: now also looking for constructor in superclasses.
8a4f25a is described below

commit 8a4f25a6dcaae2b704bce5794e007131236cb0d7
Author: Duncan Doyle <Du...@gmail.com>
AuthorDate: Fri Apr 19 19:26:40 2019 +0200

    Fixes CAMEL-13437: now also looking for constructor in superclasses.
---
 .../main/java/org/apache/camel/processor/ThrowExceptionProcessor.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/camel-core/src/main/java/org/apache/camel/processor/ThrowExceptionProcessor.java b/core/camel-core/src/main/java/org/apache/camel/processor/ThrowExceptionProcessor.java
index 0d5e16d..ba5ddc7 100644
--- a/core/camel-core/src/main/java/org/apache/camel/processor/ThrowExceptionProcessor.java
+++ b/core/camel-core/src/main/java/org/apache/camel/processor/ThrowExceptionProcessor.java
@@ -58,7 +58,7 @@ public class ThrowExceptionProcessor extends AsyncProcessorSupport implements Tr
                 // create the message using simple language so it can be dynamic
                 String text = simple.evaluate(exchange, String.class);
                 // create a new exception of that type, and provide the message as
-                Constructor<?> constructor = type.getDeclaredConstructor(String.class);
+                Constructor<?> constructor = type.getConstructor(String.class);
                 cause = (Exception) constructor.newInstance(text);
                 exchange.setException(cause);
             } else if (cause == null && type != null) {