You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Henri Biestro (Created) (JIRA)" <ji...@apache.org> on 2012/01/30 11:49:10 UTC

[jira] [Created] (JEXL-126) Decimal numbers literals should be 'double' by default (instead of 'float')

Decimal numbers literals should be 'double' by default (instead of 'float')
---------------------------------------------------------------------------

                 Key: JEXL-126
                 URL: https://issues.apache.org/jira/browse/JEXL-126
             Project: Commons JEXL
          Issue Type: Improvement
            Reporter: Henri Biestro
            Priority: Minor
             Fix For: 3.0


Since Jexl 1.x, decimal number literals are 'float'; it would be more natural (pun unintended) to create 'double' instead since they are used more often (reduce 'surprise' effects).
Note that since 2.1, numbers literals notations allow typing; '123f' is a float literal.

--
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

        

[jira] [Issue Comment Edited] (JEXL-126) Decimal numbers literals should be 'double' by default (instead of 'float')

Posted by "Henri Biestro (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JEXL-126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13266052#comment-13266052 ] 

Henri Biestro edited comment on JEXL-126 at 5/1/12 8:37 PM:
------------------------------------------------------------

Fixed in 2.1.2 through commit Revision: 1332806
jexl2/pom.xml
jexl2/src/main/java/org/apache/commons/jexl2/Interpreter.java
jexl2/src/main/java/org/apache/commons/jexl2/JexlArithmetic.java
jexl2/src/main/java/org/apache/commons/jexl2/JexlEngine.java
jexl2/src/main/java/org/apache/commons/jexl2/JexlException.java
jexl2/src/main/java/org/apache/commons/jexl2/ObjectContext.java
jexl2/src/main/java/org/apache/commons/jexl2/UnifiedJEXL.java
>>
jexl2/src/main/java/org/apache/commons/jexl2/parser/ASTNumberLiteral.java
>>
jexl2/src/test/java/org/apache/commons/jexl2/ArithmeticTest.java
jexl2/src/test/java/org/apache/commons/jexl2/ArrayLiteralTest.java
jexl2/src/test/java/org/apache/commons/jexl2/ExceptionTest.java
jexl2/src/test/java/org/apache/commons/jexl2/IssuesTest.java
Revision: 1332806

Grace, you can generate your diff between jexl2/src/main/java/org/apache/commons/jexl2/parser/ASTNumberLiteral.java in your version and the trunk.
                
      was (Author: henrib):
    Fixed in 2.1.2 through commit Revision: 1332806
jexl2/pom.xml
jexl2/src/main/java/org/apache/commons/jexl2/Interpreter.java
jexl2/src/main/java/org/apache/commons/jexl2/JexlArithmetic.java
jexl2/src/main/java/org/apache/commons/jexl2/JexlEngine.java
jexl2/src/main/java/org/apache/commons/jexl2/JexlException.java
jexl2/src/main/java/org/apache/commons/jexl2/ObjectContext.java
jexl2/src/main/java/org/apache/commons/jexl2/UnifiedJEXL.java
>>
jexl2/src/main/java/org/apache/commons/jexl2/parser/ASTNumberLiteral.java
>>
jexl2/src/test/java/org/apache/commons/jexl2/ArithmeticTest.java
jexl2/src/test/java/org/apache/commons/jexl2/ArrayLiteralTest.java
jexl2/src/test/java/org/apache/commons/jexl2/ExceptionTest.java
jexl2/src/test/java/org/apache/commons/jexl2/IssuesTest.java
Revision: 1332806
                  
> Decimal numbers literals should be 'double' by default (instead of 'float')
> ---------------------------------------------------------------------------
>
>                 Key: JEXL-126
>                 URL: https://issues.apache.org/jira/browse/JEXL-126
>             Project: Commons JEXL
>          Issue Type: Improvement
>            Reporter: Henri Biestro
>            Assignee: Henri Biestro
>            Priority: Minor
>             Fix For: 2.1.2, 3.0
>
>
> Since Jexl 1.x, decimal number literals are 'float'; it would be more natural (pun unintended) to create 'double' instead since they are used more often (reduce 'surprise' effects).
> Note that since 2.1, numbers literals notations allow typing; '123f' is a float literal.

--
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

        

[jira] [Resolved] (JEXL-126) Decimal numbers literals should be 'double' by default (instead of 'float')

Posted by "Henri Biestro (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JEXL-126?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Henri Biestro resolved JEXL-126.
--------------------------------

    Resolution: Fixed
      Assignee: Henri Biestro

Updated ASTNumberLiteral
                
> Decimal numbers literals should be 'double' by default (instead of 'float')
> ---------------------------------------------------------------------------
>
>                 Key: JEXL-126
>                 URL: https://issues.apache.org/jira/browse/JEXL-126
>             Project: Commons JEXL
>          Issue Type: Improvement
>            Reporter: Henri Biestro
>            Assignee: Henri Biestro
>            Priority: Minor
>             Fix For: 3.0
>
>
> Since Jexl 1.x, decimal number literals are 'float'; it would be more natural (pun unintended) to create 'double' instead since they are used more often (reduce 'surprise' effects).
> Note that since 2.1, numbers literals notations allow typing; '123f' is a float literal.

--
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

        

[jira] [Commented] (JEXL-126) Decimal numbers literals should be 'double' by default (instead of 'float')

Posted by "Henri Biestro (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JEXL-126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13222421#comment-13222421 ] 

Henri Biestro commented on JEXL-126:
------------------------------------

Hi Grace,
I'm not sure what you are looking for; am I correct understanding you need a patch on 2.1.1 (not an updated 3.0 trunk) that solves this issue ?
Cheers;
Henrib
                
> Decimal numbers literals should be 'double' by default (instead of 'float')
> ---------------------------------------------------------------------------
>
>                 Key: JEXL-126
>                 URL: https://issues.apache.org/jira/browse/JEXL-126
>             Project: Commons JEXL
>          Issue Type: Improvement
>            Reporter: Henri Biestro
>            Assignee: Henri Biestro
>            Priority: Minor
>             Fix For: 3.0
>
>
> Since Jexl 1.x, decimal number literals are 'float'; it would be more natural (pun unintended) to create 'double' instead since they are used more often (reduce 'surprise' effects).
> Note that since 2.1, numbers literals notations allow typing; '123f' is a float literal.

--
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

        

[jira] [Updated] (JEXL-126) Decimal numbers literals should be 'double' by default (instead of 'float')

Posted by "Henri Biestro (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JEXL-126?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Henri Biestro updated JEXL-126:
-------------------------------

    Fix Version/s: 2.1.2

Fixed in 2.1.2 through commit Revision: 1332806
jexl2/pom.xml
jexl2/src/main/java/org/apache/commons/jexl2/Interpreter.java
jexl2/src/main/java/org/apache/commons/jexl2/JexlArithmetic.java
jexl2/src/main/java/org/apache/commons/jexl2/JexlEngine.java
jexl2/src/main/java/org/apache/commons/jexl2/JexlException.java
jexl2/src/main/java/org/apache/commons/jexl2/ObjectContext.java
jexl2/src/main/java/org/apache/commons/jexl2/UnifiedJEXL.java
>>
jexl2/src/main/java/org/apache/commons/jexl2/parser/ASTNumberLiteral.java
>>
jexl2/src/test/java/org/apache/commons/jexl2/ArithmeticTest.java
jexl2/src/test/java/org/apache/commons/jexl2/ArrayLiteralTest.java
jexl2/src/test/java/org/apache/commons/jexl2/ExceptionTest.java
jexl2/src/test/java/org/apache/commons/jexl2/IssuesTest.java
Revision: 1332806
                
> Decimal numbers literals should be 'double' by default (instead of 'float')
> ---------------------------------------------------------------------------
>
>                 Key: JEXL-126
>                 URL: https://issues.apache.org/jira/browse/JEXL-126
>             Project: Commons JEXL
>          Issue Type: Improvement
>            Reporter: Henri Biestro
>            Assignee: Henri Biestro
>            Priority: Minor
>             Fix For: 2.1.2, 3.0
>
>
> Since Jexl 1.x, decimal number literals are 'float'; it would be more natural (pun unintended) to create 'double' instead since they are used more often (reduce 'surprise' effects).
> Note that since 2.1, numbers literals notations allow typing; '123f' is a float literal.

--
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

        

[jira] [Commented] (JEXL-126) Decimal numbers literals should be 'double' by default (instead of 'float')

Posted by "Grace (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JEXL-126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13232951#comment-13232951 ] 

Grace commented on JEXL-126:
----------------------------

Hi Henri,

Sorry for the late response.  I missed the email.  Yes, I would like a patch on the 2.1.1 version.

Thank you!
Grace
                
> Decimal numbers literals should be 'double' by default (instead of 'float')
> ---------------------------------------------------------------------------
>
>                 Key: JEXL-126
>                 URL: https://issues.apache.org/jira/browse/JEXL-126
>             Project: Commons JEXL
>          Issue Type: Improvement
>            Reporter: Henri Biestro
>            Assignee: Henri Biestro
>            Priority: Minor
>             Fix For: 3.0
>
>
> Since Jexl 1.x, decimal number literals are 'float'; it would be more natural (pun unintended) to create 'double' instead since they are used more often (reduce 'surprise' effects).
> Note that since 2.1, numbers literals notations allow typing; '123f' is a float literal.

--
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

        

[jira] [Commented] (JEXL-126) Decimal numbers literals should be 'double' by default (instead of 'float')

Posted by "Grace K (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JEXL-126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13218418#comment-13218418 ] 

Grace K commented on JEXL-126:
------------------------------

Thanks Henri.  I was the one who inquired about this on the mailing list.  It would be really helpful to me if you could attach the patch here or point me to a link to the patch.  My company follows certain liscensing contraints.

Thanks, Grace
                
> Decimal numbers literals should be 'double' by default (instead of 'float')
> ---------------------------------------------------------------------------
>
>                 Key: JEXL-126
>                 URL: https://issues.apache.org/jira/browse/JEXL-126
>             Project: Commons JEXL
>          Issue Type: Improvement
>            Reporter: Henri Biestro
>            Assignee: Henri Biestro
>            Priority: Minor
>             Fix For: 3.0
>
>
> Since Jexl 1.x, decimal number literals are 'float'; it would be more natural (pun unintended) to create 'double' instead since they are used more often (reduce 'surprise' effects).
> Note that since 2.1, numbers literals notations allow typing; '123f' is a float literal.

--
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