You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "dion gillard (JIRA)" <ji...@apache.org> on 2006/09/26 15:14:50 UTC

[jira] Created: (JEXL-24) Support Long for integer literal instead of Integers

Support Long for integer literal instead of Integers
----------------------------------------------------

                 Key: JEXL-24
                 URL: http://issues.apache.org/jira/browse/JEXL-24
             Project: Commons JEXL
          Issue Type: Improvement
    Affects Versions: 1.1
            Reporter: dion gillard
            Priority: Minor
             Fix For: 1.1.1


Manisha Athavale reports:

Hello,

     We use the jexl 1.1 jar for simple expression evaluation. The parser throws number format exception when gave expression like "3988514195 - SP". What is the limit for constants used in expression? Actually, there should not be any limit for constants in the expression, is it correct?

Integer literals (such as the one above) are bound by Integer.MAX_VALUE. You may have better luck changing the value to 3988514195.0

Consider this a request for integer literals to be stored as Longs

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


[jira] Updated: (JEXL-24) Support Long for integer literal instead of Integers

Posted by "dion gillard (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JEXL-24?page=all ]

dion gillard updated JEXL-24:
-----------------------------

    Attachment: JEXL-24.patch.txt

Patch attached.
Before applying, this change should be discussed.

> Support Long for integer literal instead of Integers
> ----------------------------------------------------
>
>                 Key: JEXL-24
>                 URL: http://issues.apache.org/jira/browse/JEXL-24
>             Project: Commons JEXL
>          Issue Type: Improvement
>    Affects Versions: 1.1
>            Reporter: dion gillard
>            Priority: Minor
>             Fix For: 1.1.1
>
>         Attachments: JEXL-24.patch.txt
>
>
> Manisha Athavale reports:
> Hello,
>      We use the jexl 1.1 jar for simple expression evaluation. The parser throws number format exception when gave expression like "3988514195 - SP". What is the limit for constants used in expression? Actually, there should not be any limit for constants in the expression, is it correct?
> Integer literals (such as the one above) are bound by Integer.MAX_VALUE. You may have better luck changing the value to 3988514195.0
> Consider this a request for integer literals to be stored as Longs

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


[jira] Commented: (JEXL-24) Support Long for integer literal instead of Integers

Posted by "Rahul Akolkar (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JEXL-24?page=comments#action_12437872 ] 
            
Rahul Akolkar commented on JEXL-24:
-----------------------------------

The patch seems to contain some noise (such as removing a license header, formatting changes?), but the crux (using Longs here) is better, and also aligns with EL.

However, note that we have to change the test cases accordingly, which makes me wonder whether any users could be similarly relying on the fact that these are Integers, and hence, I'm not too comfortable for this to be part of a point release. The next minor release? What do you think?

In general, number format exceptions are a language limitation, and there is only so much to be done about those (ofcourse, we want to move to Longs in this particular case at some point, but even that is going to have a cap).


> Support Long for integer literal instead of Integers
> ----------------------------------------------------
>
>                 Key: JEXL-24
>                 URL: http://issues.apache.org/jira/browse/JEXL-24
>             Project: Commons JEXL
>          Issue Type: Improvement
>    Affects Versions: 1.1
>            Reporter: dion gillard
>            Priority: Minor
>             Fix For: 1.1.1
>
>         Attachments: JEXL-24.patch.txt
>
>
> Manisha Athavale reports:
> Hello,
>      We use the jexl 1.1 jar for simple expression evaluation. The parser throws number format exception when gave expression like "3988514195 - SP". What is the limit for constants used in expression? Actually, there should not be any limit for constants in the expression, is it correct?
> Integer literals (such as the one above) are bound by Integer.MAX_VALUE. You may have better luck changing the value to 3988514195.0
> Consider this a request for integer literals to be stored as Longs

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org