Bug 291993

Summary: [DataBinding] Are the StringTo(Byte|Short)Converter classes obsolete?
Product: [Eclipse Project] Platform Reporter: Ovidio Mallo <mallo.ovidio>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: NEW --- QA Contact:
Severity: minor    
Priority: P3 CC: jens
Version: 3.5.1   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Ovidio Mallo CLA 2009-10-11 05:50:14 EDT
The methods StringToNumberConverter#toByte()/#toShort() both return a generic StringToNumberConverter instance which already handles all the possible Number types in its #convert() method. On the other hand, there are also specific StringTo(Byte|Short)Converter classes which seem to do exactly the same for the specific case of converting to a byte/short. Unless I'm missing something, I would say that the StringTo(Byte|Short)Converter classes could be replaced with the generic StringToNumberConverter class?
Comment 1 Eclipse Webmaster CLA 2019-09-06 15:32:43 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.
Comment 2 Jens Lideström CLA 2021-12-29 16:30:16 EST
Good spot, Ovidio!

I'm sorry it took 12 year for someone to react to it..

The type specific string-to-xxx converters are internal and seem only to be used by the default converter map in UpdateStrategy.

It would be a nice cleanup refactoring to throw them out and replace their usage with StringToNumberConverter/NumberToStringConverter.