Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipse-pmc] API Request: Breaking changes to Data Binding API (bug 177256)

I would like to request permission for the following breaking changes to the data binding API.

Remove the following converters...
* ConvertString2Double
* ConvertString2DoublePrimitive
* ConvertString2Float
* ConvertString2FloatPrimitive
* ConvertString2Integer
* ConvertString2IntegerPrimitive
* ConvertString2Long
* ConvertString2LongPrimitive

And replace them with...
* NumberToStringConverter
* StringToNumberConverter

Converters are used to translate from one type to another.  The new converters use ICU4J in order to convert from localized strings to Numbers and back again.  The previous versions relied upon unlocalized formatting and parsing.  The dependency upon ICU4J relies only upon the API available in the replacement plugin[1] to ensure that the consumer doesn't have to include the full ICU4J.

GOALS/BENEFITS:
Less API for the parsing and formatting of numeric values.  The API also exposes the ability for clients to pass their own NumberFormat instance to customize the formatting and parsing of the string.

CORRESPONDING BUG:
[DataBinding] Refactor converters to use ICU4J - https://bugs.eclipse.org/bugs/show_bug.cgi?id=177256

RISKS:
Minimal risk.  Most consumers don't directly reference these converters as we default them for them.

PERFORMANCE IMPACTS:
The only impact would be the overhead of using ICU4J rather than the toString() and parse*() implementations on each Number.

Thanks,
Brad Reynolds




Back to the top