camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (Updated) (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CAMEL-4821) API problems in org.apache.camel.util.OgnlHelper
Date Fri, 23 Dec 2011 05:51:31 GMT

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

Claus Ibsen updated CAMEL-4821:
-------------------------------

      Component/s: documentation
                   camel-core
    Fix Version/s: 2.9.1
       Issue Type: Task  (was: Bug)
    
> 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.1
>
>
> 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

        

Mime
View raw message