Bug 291993 - [DataBinding] Are the StringTo(Byte|Short)Converter classes obsolete?
Summary: [DataBinding] Are the StringTo(Byte|Short)Converter classes obsolete?
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.5.1   Edit
Hardware: All All
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-11 05:50 EDT by Ovidio Mallo CLA
Modified: 2021-12-29 16:30 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.