From: "Adrian Crum" <[EMAIL PROTECTED]>
David E Jones wrote:
What I'm proposing is to fix this further up the stack in the GenericEntity.set method instead of lower down. I guess either way
we have the two options I mentioned earlier:
1. fail fast(er) by having OFBiz throw an exception
2. try to auto-convert
#1 will result, as Adrian mentioned, in a bunch of possibly undiscovered places where the wrong object type is passed in, causing
OFBiz to not function until these are cleaned up. On the other hand, in order to reliably work on most databases these need to be
fixed sooner or later.
#2 has the problem, also as Adrian mentioned, of possibly not doing the conversion correctly, especially in cases where
locale-sensitive parsing is needed or there is a special format string or something.
In spite of the short-term pain my vote is still for #1, and to do it higher up in the GenericEntity.set method in order to fail
right when it's set, not later on when the GenericDelegator method is called, so that we know where the bad object type is being
passed.
My vote is for #1 also. I agree it's going to be a pain, but I believe it's the
responsible and reliable thing to do.
Maybe we could add an interrupting tool (at different code points if needed) on the demo server which would catch and put in log all
points needed to be changed before really changing them ?
Hope I"m clear
Jacques
-Adrian