camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Glen Mazza (Created) (JIRA)" <>
Subject [jira] [Created] (CAMEL-4821) API problems in org.apache.camel.util.OgnlHelper
Date Thu, 22 Dec 2011 21:13:30 GMT
API problems in org.apache.camel.util.OgnlHelper

                 Key: CAMEL-4821
             Project: Camel
          Issue Type: Bug
            Reporter: Glen Mazza
            Priority: Minor

Hi, the OgnlHelper class:

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:
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:!default.jspa
For more information on JIRA, see:


View raw message