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

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

commit 2262e2f2a33b1e35326f2061cff742277c8aaf1c
Author: Gilvan Filho <[email protected]>
AuthorDate: Mon Dec 5 20:27:30 2022 -0300

    (chores) camel-cxf-transport: replace inner class with lambda
---
 .../component/cxf/transport/CamelOutputStream.java | 24 ++++++++++------------
 1 file changed, 11 insertions(+), 13 deletions(-)

diff --git 
a/components/camel-cxf/camel-cxf-transport/src/main/java/org/apache/camel/component/cxf/transport/CamelOutputStream.java
 
b/components/camel-cxf/camel-cxf-transport/src/main/java/org/apache/camel/component/cxf/transport/CamelOutputStream.java
index 4345bb12d9d..05efe1c7ca2 100644
--- 
a/components/camel-cxf/camel-cxf-transport/src/main/java/org/apache/camel/component/cxf/transport/CamelOutputStream.java
+++ 
b/components/camel-cxf/camel-cxf-transport/src/main/java/org/apache/camel/component/cxf/transport/CamelOutputStream.java
@@ -125,20 +125,18 @@ class CamelOutputStream extends CachedOutputStream {
     }
 
     protected void asyncInvokeFromWorkQueue(final org.apache.camel.Exchange 
exchange) throws IOException {
-        Runnable runnable = new Runnable() {
-            public void run() {
-                try {
-                    syncInvoke(exchange);
-                } catch (Throwable e) {
-                    ((PhaseInterceptorChain) 
outMessage.getInterceptorChain()).abort();
-                    outMessage.setContent(Exception.class, e);
-                    ((PhaseInterceptorChain) 
outMessage.getInterceptorChain()).unwind(outMessage);
-                    MessageObserver mo = 
outMessage.getInterceptorChain().getFaultObserver();
-                    if (mo == null) {
-                        mo = 
outMessage.getExchange().get(MessageObserver.class);
-                    }
-                    mo.onMessage(outMessage);
+        Runnable runnable = () -> {
+            try {
+                syncInvoke(exchange);
+            } catch (Throwable e) {
+                ((PhaseInterceptorChain) 
outMessage.getInterceptorChain()).abort();
+                outMessage.setContent(Exception.class, e);
+                ((PhaseInterceptorChain) 
outMessage.getInterceptorChain()).unwind(outMessage);
+                MessageObserver mo = 
outMessage.getInterceptorChain().getFaultObserver();
+                if (mo == null) {
+                    mo = outMessage.getExchange().get(MessageObserver.class);
                 }
+                mo.onMessage(outMessage);
             }
         };
 

Reply via email to