Skip to main content

[json-processing-spec issues] [JIRA] Commented: (JSON_PROCESSING_SPEC-41) Remove NumberType.LONG and rename NumberType.BigDecimal

  • From: "keilw (JIRA)" < >
  • To:
  • Subject: [json-processing-spec issues] [JIRA] Commented: (JSON_PROCESSING_SPEC-41) Remove NumberType.LONG and rename NumberType.BigDecimal
  • Date: Wed, 12 Dec 2012 14:13:00 +0000 (GMT+00:00)
  • Auto-submitted: auto-generated


    [ 
http://java.net/jira/browse/JSON_PROCESSING_SPEC-41?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=351778#action_351778
 ] 

keilw commented on JSON_PROCESSING_SPEC-41:
-------------------------------------------

>The algorithm for distinguishing these two types should be based on whether 
>>BigDecimal#scale() is 0.

What would it be on ME, as BigDecimal and BigInteger would not be there?

> Remove NumberType.LONG and rename NumberType.BigDecimal
> -------------------------------------------------------
>
>                 Key: JSON_PROCESSING_SPEC-41
>                 URL: http://java.net/jira/browse/JSON_PROCESSING_SPEC-41
>             Project: json-processing-spec
>          Issue Type: Improvement
>    Affects Versions: 1.0-pr
>            Reporter: jhorstmann
>            Assignee: jitu
>             Fix For: 1.0-pr
>
>
> NumberType would be less confusing if it just stated the distinction 
> whether a number has a fractional part.
> A NumberType of INTEGER would guarantee that calling getBigIntegerValue 
> does not throw an ArithmeticException. The NumberType would be independent 
> of the actual magnitude of the number, thus calling getIntValueExact might 
> still throw an Exception if the number is smaller than Integer.MIN_VALUE of 
> larger than Integer.MAX_VALUE.
> The current NumberType BIG_DECIMAL should be renamed to just DECIMAL or 
> REAL (see http://en.wikipedia.org/wiki/Real_number) and would indicate that 
> the number has a fractional part and calling 
> get(Int|Long|BigInteger)ValueExact might throw an ArithmeticException.
> The algorithm for distinguishing these two types should be based on whether 
> BigDecimal#scale() is 0.  
> Discussion at 
> http://java.net/projects/json-processing-spec/lists/users/archive/2012-12/message/43

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

        


[json-processing-spec issues] [JIRA] Created: (JSON_PROCESSING_SPEC-41) Remove NumberType.LONG and rename NumberType.BigDecimal

jhorstmann (JIRA) 12/11/2012

[json-processing-spec issues] [JIRA] Commented: (JSON_PROCESSING_SPEC-41) Remove NumberType.LONG and rename NumberType.BigDecimal

jhorstmann (JIRA) 12/11/2012

[json-processing-spec issues] [JIRA] Updated: (JSON_PROCESSING_SPEC-41) Remove NumberType.LONG and rename NumberType.BigDecimal

jitu (JIRA) 12/11/2012

[json-processing-spec issues] [JIRA] Updated: (JSON_PROCESSING_SPEC-41) Remove NumberType.LONG and rename NumberType.BigDecimal

jitu (JIRA) 12/11/2012

[json-processing-spec issues] [JIRA] Issue Comment Edited: (JSON_PROCESSING_SPEC-41) Remove NumberType.LONG and rename NumberType.BigDecimal

jitu (JIRA) 12/12/2012

[json-processing-spec issues] [JIRA] Commented: (JSON_PROCESSING_SPEC-41) Remove NumberType.LONG and rename NumberType.BigDecimal

keilw (JIRA) 12/12/2012

[json-processing-spec issues] [JIRA] Issue Comment Edited: (JSON_PROCESSING_SPEC-41) Remove NumberType.LONG and rename NumberType.BigDecimal

keilw (JIRA) 12/12/2012

[json-processing-spec issues] [JIRA] Issue Comment Edited: (JSON_PROCESSING_SPEC-41) Remove NumberType.LONG and rename NumberType.BigDecimal

keilw (JIRA) 12/12/2012

[json-processing-spec issues] [JIRA] Issue Comment Edited: (JSON_PROCESSING_SPEC-41) Remove NumberType.LONG and rename NumberType.BigDecimal

keilw (JIRA) 12/12/2012

[json-processing-spec issues] [JIRA] Issue Comment Edited: (JSON_PROCESSING_SPEC-41) Remove NumberType.LONG and rename NumberType.BigDecimal

keilw (JIRA) 12/12/2012

[json-processing-spec issues] [JIRA] Updated: (JSON_PROCESSING_SPEC-41) Remove NumberType.LONG and rename NumberType.BigDecimal

jitu (JIRA) 12/13/2012

[json-processing-spec issues] [JIRA] Commented: (JSON_PROCESSING_SPEC-41) Remove NumberType.LONG and rename NumberType.BigDecimal

jhorstmann (JIRA) 12/13/2012

[json-processing-spec issues] [JIRA] Updated: (JSON_PROCESSING_SPEC-41) Remove NumberType.LONG and rename NumberType.BigDecimal

jitu (JIRA) 12/13/2012

[json-processing-spec issues] [JIRA] Resolved: (JSON_PROCESSING_SPEC-41) Remove NumberType.LONG and rename NumberType.BigDecimal

jitu (JIRA) 12/14/2012
 
 
Close
loading
Please Confirm
Close