camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-8799) Make it possible for JsonPath to suppress PathNotFoundException
Date Thu, 11 Jan 2018 16:24:02 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-8799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16322489#comment-16322489
] 

ASF GitHub Bot commented on CAMEL-8799:
---------------------------------------

davsclaus commented on a change in pull request #528: CAMEL-8799: Make json-path suppress
PathNotFoundExceptions by default
URL: https://github.com/apache/camel/pull/528#discussion_r161001598
 
 

 ##########
 File path: components/camel-jsonpath/src/main/java/org/apache/camel/jsonpath/JsonPathEngine.java
 ##########
 @@ -38,7 +41,8 @@
     private final Configuration configuration;
 
     public JsonPathEngine(String expression) {
-        this.configuration = Configuration.defaultConfiguration();
+        Defaults defaults = DefaultsImpl.INSTANCE;
 
 Review comment:
   If its just some cleanup and minor code changes then you do NOT need to create a JIRA ticket.
We only use JIRA for normal/bigger things. So in your case, just do the PR

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Make it possible for JsonPath to suppress PathNotFoundException
> ---------------------------------------------------------------
>
>                 Key: CAMEL-8799
>                 URL: https://issues.apache.org/jira/browse/CAMEL-8799
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-jsonpath
>    Affects Versions: 2.15.2
>            Reporter: Preben Asmussen
>            Assignee: Claus Ibsen
>             Fix For: 2.16.0
>
>
> It should be possible to suppress exceptions when evaluating JsonPath's.
> See http://camel.465427.n5.nabble.com/How-to-suppress-exceptions-from-Jsonpath-expressions-td5767384.html
> There are 2 options
> 1.  Make it the default behaviour, so a null value will be returned instead of throwing
an PathNotFoundException when evaluating json path expressions and the path is not found.
I have a working patch for that here https://github.com/pax95/camel/commit/e09bd00d9199c88787f0acb0d2ea8c86e6a1bba9
that I can do a PR on.
> 2. Make it configurable on the JsonPath component so you can enable/disable it on demand.
This would also make it possible to expose other options from com.jayway.jsonpath.Option if
they make sense. More work is require to make it available as both xml and java dsl.
> Currently I'm at bit overloaded to do a PR on 2 if that is the preferred option, so if
any want to take over It will be fine.
> If option 1 is ok I'll create a PR.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message