camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bvah...@apache.org
Subject git commit: Upgraded to JSONPath 0.9.1 and polished it's component codebase a bit.
Date Wed, 30 Oct 2013 22:30:32 GMT
Updated Branches:
  refs/heads/master 4f220bf66 -> 4eb5a2921


Upgraded to JSONPath 0.9.1 and polished it's component codebase a bit.

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

Branch: refs/heads/master
Commit: 4eb5a29215144b505958aa99295cfe786ab1097b
Parents: 4f220bf
Author: Babak Vahdat <bvahdat@apache.org>
Authored: Wed Oct 30 23:30:27 2013 +0100
Committer: Babak Vahdat <bvahdat@apache.org>
Committed: Wed Oct 30 23:30:27 2013 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/camel/jsonpath/JsonPathEngine.java  | 4 +---
 .../java/org/apache/camel/jsonpath/JsonPathLanguageTest.java     | 2 +-
 .../java/org/apache/camel/jsonpath/JsonPathTransformTest.java    | 2 +-
 .../org/apache/camel/jsonpath/SpringJsonPathTransformTest.java   | 2 +-
 parent/pom.xml                                                   | 2 +-
 5 files changed, 5 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/4eb5a292/components/camel-jsonpath/src/main/java/org/apache/camel/jsonpath/JsonPathEngine.java
----------------------------------------------------------------------
diff --git a/components/camel-jsonpath/src/main/java/org/apache/camel/jsonpath/JsonPathEngine.java
b/components/camel-jsonpath/src/main/java/org/apache/camel/jsonpath/JsonPathEngine.java
index 4724199..3616dbc 100644
--- a/components/camel-jsonpath/src/main/java/org/apache/camel/jsonpath/JsonPathEngine.java
+++ b/components/camel-jsonpath/src/main/java/org/apache/camel/jsonpath/JsonPathEngine.java
@@ -29,12 +29,10 @@ import org.apache.camel.WrappedFile;
 
 public class JsonPathEngine {
 
-    private final String expression;
     private final JsonPath path;
     private final Configuration configuration;
 
     public JsonPathEngine(String expression) {
-        this.expression = expression;
         this.configuration = Configuration.defaultConfiguration();
         this.path = JsonPath.compile(expression);
     }
@@ -43,7 +41,7 @@ public class JsonPathEngine {
         Object json = exchange.getIn().getBody();
 
         if (json instanceof WrappedFile) {
-            json = ((WrappedFile) json).getFile();
+            json = ((WrappedFile<?>) json).getFile();
         }
 
         // the message body type should use the suitable read method

http://git-wip-us.apache.org/repos/asf/camel/blob/4eb5a292/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathLanguageTest.java
----------------------------------------------------------------------
diff --git a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathLanguageTest.java
b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathLanguageTest.java
index b606fa5..7f886ff 100644
--- a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathLanguageTest.java
+++ b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathLanguageTest.java
@@ -41,7 +41,7 @@ public class JsonPathLanguageTest extends CamelTestSupport {
 
         Language lan = context.resolveLanguage("jsonpath");
         Expression exp = lan.createExpression("$.store.book[*].author");
-        List authors = exp.evaluate(exchange, List.class);
+        List<?> authors = exp.evaluate(exchange, List.class);
         log.info("Authors {}", authors);
 
         assertNotNull(authors);

http://git-wip-us.apache.org/repos/asf/camel/blob/4eb5a292/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathTransformTest.java
----------------------------------------------------------------------
diff --git a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathTransformTest.java
b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathTransformTest.java
index 706c171..5b384da 100644
--- a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathTransformTest.java
+++ b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathTransformTest.java
@@ -45,7 +45,7 @@ public class JsonPathTransformTest extends CamelTestSupport {
 
         assertMockEndpointsSatisfied();
 
-        List authors = getMockEndpoint("mock:authors").getReceivedExchanges().get(0).getIn().getBody(List.class);
+        List<?> authors = getMockEndpoint("mock:authors").getReceivedExchanges().get(0).getIn().getBody(List.class);
         assertEquals("Nigel Rees", authors.get(0));
         assertEquals("Evelyn Waugh", authors.get(1));
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/4eb5a292/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/SpringJsonPathTransformTest.java
----------------------------------------------------------------------
diff --git a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/SpringJsonPathTransformTest.java
b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/SpringJsonPathTransformTest.java
index 49c6ec8..fe12e34 100644
--- a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/SpringJsonPathTransformTest.java
+++ b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/SpringJsonPathTransformTest.java
@@ -39,7 +39,7 @@ public class SpringJsonPathTransformTest extends CamelSpringTestSupport
{
 
         assertMockEndpointsSatisfied();
 
-        List authors = getMockEndpoint("mock:authors").getReceivedExchanges().get(0).getIn().getBody(List.class);
+        List<?> authors = getMockEndpoint("mock:authors").getReceivedExchanges().get(0).getIn().getBody(List.class);
         assertEquals("Nigel Rees", authors.get(0));
         assertEquals("Evelyn Waugh", authors.get(1));
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/4eb5a292/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index cf183da..967a512 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -236,7 +236,7 @@
     <jsendnsca-bundle-version>1.3.1_3</jsendnsca-bundle-version>
     <jsonlib-bundle-version>2.4_1</jsonlib-bundle-version>
     <jsonlib-version>2.4</jsonlib-version>
-    <json-path-version>0.9.0</json-path-version>
+    <json-path-version>0.9.1</json-path-version>
     <json-smart-version>1.2</json-smart-version>
     <jsp-api-2.1-version>1.0.1</jsp-api-2.1-version>
     <jsmpp-bundle-version>2.1.0_4</jsmpp-bundle-version>


Mime
View raw message