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/05/03 05:15:24 UTC

[camel] branch master updated (fcec8af -> 23622f2)

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

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


    from fcec8af  Fixed SpringBootRuntimeProviderTest for SB camel-catalog
     new 5f2a30b  camel3 - Remove unusued cruft
     new 23622f2  CAMEL-13474: Move dataformats out of camel-core.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/camel/catalog/CamelCatalogTest.java |  2 +-
 .../org/apache/camel/builder/ValueBuilder.java     | 47 ----------------------
 2 files changed, 1 insertion(+), 48 deletions(-)


[camel] 02/02: CAMEL-13474: Move dataformats out of camel-core.

Posted by da...@apache.org.
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

commit 23622f2d9dd77a6260dc59e3c0bbd56fd09ed506
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Fri May 3 07:14:57 2019 +0200

    CAMEL-13474: Move dataformats out of camel-core.
---
 .../src/test/java/org/apache/camel/catalog/CamelCatalogTest.java        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/catalog/camel-catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java b/catalog/camel-catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java
index 0d3257e..b4aa547 100644
--- a/catalog/camel-catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java
+++ b/catalog/camel-catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java
@@ -729,7 +729,7 @@ public class CamelCatalogTest {
         assertEquals("foo", result.getLenient().iterator().next());
 
         // data format
-        result = catalog.validateEndpointProperties("dataformat:string:marshal?charset=utf-8", true);
+        result = catalog.validateEndpointProperties("dataformat:zipdeflater:marshal?compressionLevel=2", true);
         assertTrue(result.isSuccess());
 
         // 2 slash after component name


[camel] 01/02: camel3 - Remove unusued cruft

Posted by da...@apache.org.
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

commit 5f2a30b398c85613bd17c1041141536334bf0180
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Fri May 3 06:37:23 2019 +0200

    camel3 - Remove unusued cruft
---
 .../org/apache/camel/builder/ValueBuilder.java     | 47 ----------------------
 1 file changed, 47 deletions(-)

diff --git a/core/camel-core/src/main/java/org/apache/camel/builder/ValueBuilder.java b/core/camel-core/src/main/java/org/apache/camel/builder/ValueBuilder.java
index ffe3465..7c8a039 100644
--- a/core/camel-core/src/main/java/org/apache/camel/builder/ValueBuilder.java
+++ b/core/camel-core/src/main/java/org/apache/camel/builder/ValueBuilder.java
@@ -19,14 +19,11 @@ package org.apache.camel.builder;
 import java.util.ArrayList;
 import java.util.Comparator;
 import java.util.List;
-import java.util.concurrent.atomic.AtomicReference;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.Expression;
 import org.apache.camel.Predicate;
 import org.apache.camel.spi.NamespaceAware;
-import org.apache.camel.support.ExpressionAdapter;
-import org.apache.camel.support.ExpressionToPredicateAdapter;
 import org.apache.camel.support.builder.xml.Namespaces;
 
 /**
@@ -62,50 +59,6 @@ public class ValueBuilder implements Expression, Predicate {
     // Predicate builders
     // -------------------------------------------------------------------------
 
-    public Predicate matches(Expression expression) {
-        return onNewPredicate(ExpressionToPredicateAdapter.toPredicate(expression));
-    }
-
-    public ExpressionClause<Predicate> matches() {
-        // chicken-and-egg situation as we need to return an ExpressionClause
-        // which needs a right-hand side that is being built via the fluent
-        // builder that is returned, and therefore we need to use a ref
-        // to the expression (right hand side) that will be used below
-        // in the onNewPredicate where the actual matching is executed
-        final AtomicReference<Expression> ref = new AtomicReference<>();
-
-        final ExpressionClause<Predicate> answer = new ExpressionClause<>(
-            onNewPredicate(new Predicate() {
-                @Override
-                public boolean matches(Exchange exchange) {
-                    Expression left = expression;
-                    Expression right = ref.get();
-                    return PredicateBuilder.isEqualTo(left, right).matches(exchange);
-                }
-
-                @Override
-                public String toString() {
-                    return expression + " == " + ref.get();
-                }
-            }));
-
-        final Expression right = new ExpressionAdapter() {
-            @Override
-            public Object evaluate(Exchange exchange) {
-                return answer.evaluate(exchange, Object.class);
-                /*if (answer.getExpressionValue() != null) {
-                    return answer.getExpressionValue().evaluate(exchange, Object.class);
-                } else {
-                    return answer.getExpressionType().evaluate(exchange);
-                }*/
-            }
-        };
-        // okay now we can set the reference to the right-hand-side
-        ref.set(right);
-
-        return answer;
-    }
-
     public Predicate isNotEqualTo(Object value) {
         Expression right = asExpression(value);
         return onNewPredicate(PredicateBuilder.isNotEqualTo(expression, right));