Summary: | [DataBinding] IdentityConverter incorrectly (un)used by UpdateValueStrategy | ||
---|---|---|---|
Product: | [Eclipse Project] Platform | Reporter: | Michael Baranov <michael.baranov> |
Component: | UI | Assignee: | Boris Bokowski <bokowski> |
Status: | REOPENED --- | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | bradleyjames, michael.baranov |
Version: | 3.3 | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: |
Description
Michael Baranov
2007-07-21 05:33:58 EDT
(In reply to comment #0) > Consequences: binding bramework incorrectly requires com.ibm.icu_xxx.jar (3.9 > mb) at runtime (referenced class is: com.ibm.icu.text.NumberFormat from class: > org.eclipse.core.databinding.UpdateStrategy) This is by design. If you don't want the full ICU4J you can use the replacement plugin[1]. [1] http://wiki.eclipse.org/ICU4J#Replacement_Plug-in Michael, I hope the replacement plug-in solves your issues. Otherwise, please reopen. Thank for the tip. 2 Concerns, however: 1) The replacement plugin seems to be a work in progress and not available yet. 2) I still don't see why the described case of box-to-primitive and primitive-to-box should require *any* other library. I still think that org.eclipse.core.databinding.UpdateStrategy is should correctly use (instantiate) IdentityConverter in such cases *before* referencing com.ibm.icu.text.NumberFormat in the code. If you are sure this is as intended, leave it as wontfix. It's easily fixable from library user code. (In reply to comment #3) > 1) The replacement plugin seems to be a work in progress and not available yet. It is available from the download page for any Eclipse build, starting with Eclipse 3.2, in a separate section called "com.ibm.icu.base binary and source Plug-ins". > 2) I still don't see why the described case of box-to-primitive and > primitive-to-box should require *any* other library. From looking at the code, it seems that the intention was that IdentityConverter be used for the primitive-to-boxed case. I suspect that this is a bug and I'm reopening this bug accordingly. We could use IdentityConverter for the boxed-to-primitive case as well, but I'm not sure how we currently handle the "null" value - do we throw some kind of exception (like IdentityConverter does), or silently convert to zero? > From looking at the code, it seems that the intention was that > IdentityConverter be used for the primitive-to-boxed case. I suspect that this > is a bug and I'm reopening this bug accordingly. primitive-to-boxed is probably the most used type of conversion that occurs with control-to-bean type binding. IMO this case should not require any side libs. > > We could use IdentityConverter for the boxed-to-primitive case as well, but I'm > not sure how we currently handle the "null" value - do we throw some kind of > exception (like IdentityConverter does), or silently convert to zero? > I'm not sure either. IMO the same BindingException thrown from IdentityConverter should be propagated up to the user code. IMO no silent conversion should happen in null-to-primitive case. It's 100% the user's responsibility to make sure it never happens or handle it. 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. |