On 5/12/2012 9:12 PM, Adam Heath wrote:
On 05/12/2012 07:17 AM, Adrian Crum wrote:
Okay, rev 1337518 gets the tests to pass, but it isn't a fix - it merely
masks the real problem. I made the commit so others can continue with
their work, and I will continue working on the real problem.

Without going into too much detail, here is a summary of the problem:

1. Previously, Mini-language treated everything as Strings. A lot of
unnecessary conversions were being performed, and the conversions caused
quirky behavior.
2. I removed the String conversions from Mini-language assignment
operators, but that caused problems with comparison operators.
3. I tried to fix the comparison operators, but the fix doesn't work
because of a flaw in ObjectType.doRealCompare(...).
4. I tried to fix the flaw in ObjectType.doRealCompare(...) but that
caused problems in other parts of the framework.

So, this will take me a while to sort out. I hope to have everything
working properly by the end of the weekend.

I just saw your commit in my git svn rebase, checked the diff, was about to go "omg no, bad fix!". Having to specify the type is of course icky. However, you've done quite a bit of investigation, and at least on the surface, it seems to be a real bug.

However, if we have gone all these years converting things to strings during comparison, without any real problems being reported, then maybe .. I don't really know. I don't like the extra work of the string conversions that has been happening, but it does seem to have worked for us.

Trust me, converting everything to Strings and back causes a LOT of problems. I agree that having to specify the type is icky - and that was required a lot before because of the conversion to String. That is one of the things I'm trying to fix in the overhaul.

Here is an example of the bad Mini-language behavior and why i want to fix it:

<now-timestamp field="nowTimestamp" /> <!-- nowTimestamp is a java.sql.Timestamp --> <set field="timestampCopy" from-field="nowTimestamp" /> <!-- timestampCopy is a java.lang.String -->

There are other quirks where the conversion to String doesn't go as planned because of localization.

So, the whole thing is a mess. It has been a problem for years, and I've always wanted to fix it. So now I'm fixing it.

-Adrian

Reply via email to