You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Hadrian Zbarcea (Updated) (JIRA)" <ji...@apache.org> on 2012/03/01 18:37:57 UTC

[jira] [Updated] (CAMEL-4821) API problems in org.apache.camel.util.OgnlHelper

     [ https://issues.apache.org/jira/browse/CAMEL-4821?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hadrian Zbarcea updated CAMEL-4821:
-----------------------------------

    Fix Version/s:     (was: 2.9.1)
                   2.9.2
    
> API problems in org.apache.camel.util.OgnlHelper
> ------------------------------------------------
>
>                 Key: CAMEL-4821
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4821
>             Project: Camel
>          Issue Type: Task
>          Components: camel-core, documentation
>            Reporter: Glen Mazza
>            Priority: Minor
>             Fix For: 2.9.2
>
>
> Hi, the OgnlHelper class:
> http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/util/OgnlHelper.java?annotate=1145881
> appears to have a couple of issues with it:
> 1.)  There's a nonsensically named "isInvalidValidOgnlExpression(String expression)" method at line #59, I'm not sure why it's needed because there is an isValidOgnlExpression() just above it, the negative of which can be used to accomplish to goal of isInvalidValidOgnlExpression.  If desired to retain this method, best to leave a comment why it's not named isInvalidOgnlExpression and why the negative of isValidOgnlExpression() is insufficient.  Otherwise, this method should be deprecated, either with a new isInvalidOgnlExpression in its place that does the same thing or with no replacement (i.e., users should just use !isValidOgnlExpression().
> 2.) The method "isNullSafeOperator()" at line #89 says it checks whether the "Elvis" operator is being used -- but the code is just checking for a "?" According to here: https://docs.google.com/Doc?docid=ddb3zt39_78frdf87dc&hl=en the Elvis operator is the binary "?:" token (not the ternary a = (b > c) ? d : e one).  Perhaps a change is needed to the logic to check for "?:" or an update to the JavaDoc for this method that it's not the Elvis operator being checked for.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira