Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2042)

Issue 291680043: CurrencyDisplay SpacingInfo - Java (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
7 years, 11 months ago by sffc
Modified:
7 years, 8 months ago
Reviewers:
markus.icu
CC:
fabalbon
Base URL:
svn+icussh://source.icu-project.org/repos/icu/icu4j/trunk/
Visibility:
Public.

Description

Transitioning CurrencyDisplayInfo.getSpacingInfo to use data sinks.

Patch Set 1 #

Total comments: 16

Patch Set 2 : Updating with Markus's first round of feedback. #

Total comments: 2

Patch Set 3 : Updating with Markus's second round of feedback #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+105 lines, -44 lines) Patch
M main/classes/core/src/com/ibm/icu/impl/CurrencyData.java View 1 2 2 chunks +33 lines, -17 lines 0 comments Download
M main/classes/core/src/com/ibm/icu/text/DecimalFormatSymbols.java View 1 2 3 chunks +8 lines, -11 lines 3 comments Download
M main/classes/currdata/src/com/ibm/icu/impl/ICUCurrencyDisplayInfoProvider.java View 1 2 2 chunks +64 lines, -16 lines 0 comments Download

Messages

Total messages: 13
sffc
https://codereview.appspot.com/291680043/diff/1/main/classes/currdata/src/com/ibm/icu/impl/ICUCurrencyDisplayInfoProvider.java File main/classes/currdata/src/com/ibm/icu/impl/ICUCurrencyDisplayInfoProvider.java (right): https://codereview.appspot.com/291680043/diff/1/main/classes/currdata/src/com/ibm/icu/impl/ICUCurrencyDisplayInfoProvider.java#newcode192 main/classes/currdata/src/com/ibm/icu/impl/ICUCurrencyDisplayInfoProvider.java:192: private final class SpacingInfoSink extends UResource.Sink { This seems ...
7 years, 11 months ago (2016-05-10 01:33:27 UTC) #1
markus.icu
https://codereview.appspot.com/291680043/diff/1/main/classes/core/src/com/ibm/icu/impl/CurrencyData.java File main/classes/core/src/com/ibm/icu/impl/CurrencyData.java (right): https://codereview.appspot.com/291680043/diff/1/main/classes/core/src/com/ibm/icu/impl/CurrencyData.java#newcode3 main/classes/core/src/com/ibm/icu/impl/CurrencyData.java:3: * Copyright (C) 2009-2012, International Business Machines Corporation and ...
7 years, 11 months ago (2016-05-13 17:29:09 UTC) #2
sffc
Updating with Markus's first round of feedback.
7 years, 11 months ago (2016-05-16 22:56:23 UTC) #3
sffc
I made a few larger changes to CurrencySpacingInfo in order to make the pipeline more ...
7 years, 11 months ago (2016-05-16 22:59:25 UTC) #4
markus.icu
https://codereview.appspot.com/291680043/diff/1/main/classes/core/src/com/ibm/icu/impl/CurrencyData.java File main/classes/core/src/com/ibm/icu/impl/CurrencyData.java (right): https://codereview.appspot.com/291680043/diff/1/main/classes/core/src/com/ibm/icu/impl/CurrencyData.java#newcode51 main/classes/core/src/com/ibm/icu/impl/CurrencyData.java:51: if (strings.length != 6) { On 2016/05/16 22:59:24, sffc ...
7 years, 10 months ago (2016-05-28 19:26:15 UTC) #5
sffc
Updating with Markus's second round of feedback
7 years, 10 months ago (2016-05-30 04:06:13 UTC) #6
sffc
Updating with Markus's second round of feedback
7 years, 10 months ago (2016-05-30 04:22:48 UTC) #7
sffc
https://codereview.appspot.com/291680043/diff/1/main/classes/core/src/com/ibm/icu/impl/CurrencyData.java File main/classes/core/src/com/ibm/icu/impl/CurrencyData.java (right): https://codereview.appspot.com/291680043/diff/1/main/classes/core/src/com/ibm/icu/impl/CurrencyData.java#newcode51 main/classes/core/src/com/ibm/icu/impl/CurrencyData.java:51: if (strings.length != 6) { On 2016/05/28 19:26:14, markus.icu ...
7 years, 10 months ago (2016-05-30 04:23:48 UTC) #8
markus.icu
LGTM
7 years, 10 months ago (2016-05-30 18:13:38 UTC) #9
sffc
On 2016/05/30 18:13:38, markus.icu wrote: > LGTM Submitted as r38772.
7 years, 10 months ago (2016-05-31 16:35:38 UTC) #10
sffc
https://codereview.appspot.com/291680043/diff/60001/main/classes/core/src/com/ibm/icu/text/DecimalFormatSymbols.java File main/classes/core/src/com/ibm/icu/text/DecimalFormatSymbols.java (right): https://codereview.appspot.com/291680043/diff/60001/main/classes/core/src/com/ibm/icu/text/DecimalFormatSymbols.java#newcode1072 main/classes/core/src/com/ibm/icu/text/DecimalFormatSymbols.java:1072: currencySpcBeforeSym = spcInfo.getBeforeSymbols(); Coverity pointed out that it is ...
7 years, 8 months ago (2016-08-10 02:37:36 UTC) #11
markus.icu
https://codereview.appspot.com/291680043/diff/60001/main/classes/core/src/com/ibm/icu/text/DecimalFormatSymbols.java File main/classes/core/src/com/ibm/icu/text/DecimalFormatSymbols.java (right): https://codereview.appspot.com/291680043/diff/60001/main/classes/core/src/com/ibm/icu/text/DecimalFormatSymbols.java#newcode1072 main/classes/core/src/com/ibm/icu/text/DecimalFormatSymbols.java:1072: currencySpcBeforeSym = spcInfo.getBeforeSymbols(); On 2016/08/10 02:37:35, sffc wrote: > ...
7 years, 8 months ago (2016-08-11 22:30:47 UTC) #12
sffc
7 years, 8 months ago (2016-08-11 23:20:01 UTC) #13
https://codereview.appspot.com/291680043/diff/60001/main/classes/core/src/com...
File main/classes/core/src/com/ibm/icu/text/DecimalFormatSymbols.java (right):

https://codereview.appspot.com/291680043/diff/60001/main/classes/core/src/com...
main/classes/core/src/com/ibm/icu/text/DecimalFormatSymbols.java:1072:
currencySpcBeforeSym = spcInfo.getBeforeSymbols();
On 2016/08/11 22:30:47, markus.icu wrote:
> On 2016/08/10 02:37:35, sffc wrote:
> > Coverity pointed out that it is possible for spcInfo to be null.  This would
> > happen if there is no data available and the user specified no fallback. 
What
> > would be the best way to handle such a case?
> 
> We should probably fall back to hardcoded data if all else fails. How did the
> pre-enumeration code handle this case?

There are indeed hard-coded fallbacks, but they can be disabled by an argument
to CurrencyData.getInstance().  However, it appears that DecimalFormatSymbols
always accepts the fallback strings:

CurrencyDisplayInfo info = CurrencyData.provider.getInstance(locale, true);

where "true" is the optional fallback parameter.  So spcInfo can never be null. 
I'll dismiss the error in Coverity.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b