[
http://jira.codehaus.org/browse/JANINO-126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=179477#action_179477 ]
Matt Fowles commented on JANINO-126:
------------------------------------
You can find a fixed version of this at
http://code.google.com/p/janino-streambase/> ExpressionEvaluator isn't handling NaN correctly
> ------------------------------------------------
>
> Key: JANINO-126
> URL:
http://jira.codehaus.org/browse/JANINO-126> Project: Janino
> Issue Type: Bug
> Affects Versions: 2.5.12, 2.5.13, 2.5.14, 2.5.15
> Environment: Windows jdk5
> Reporter: mark zeldis
> Assignee: Arno Unkrig
> Attachments: NaN.diff
>
>
> NaN is not working within the ExpressionEvaluator. All evaluations involving NaN should be false. Here is an example:
> import org.codehaus.janino.*;
> public class TestTest {
> public static void main(String args[]){
> try {
> ExpressionEvaluator advancedFilter= new ExpressionEvaluator(
> "x>5", // expression
> Boolean.class, // expressionType
> new String[]{"x"}, // parameterNames
> new Class[]{Double.class} // parameterTypes
> );
> System.err.println(advancedFilter.evaluate(new Double[]{Double.NaN}));
> System.err.println(Double.NaN>5);
> }
> catch (Exception e) {
> e.printStackTrace();
> }
> }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email