On 05/16/2012 11:30 AM, Adam Heath wrote:
> On 05/16/2012 11:18 AM, Adam Heath wrote:
>> On 05/16/2012 11:05 AM, Adam Heath wrote:
>>> On 05/16/2012 06:41 AM, Jacopo Cappellato wrote:
>>>> https://demo-trunk.ofbiz.apache.org/ordermgr/control/orderview?orderId=Demo1002
>>>
>>> This may be a stupid question, but why doesn't "admin/ofbiz" work as a
>>> login?  (right now, the admin account is disabled for 5 minutes,
>>> that's my fault).
>>>
>>> I can't yet see this error.  I'm updating to trunk, and will attempt
>>> the same thing locally.
>>
>> Is freemarker really this stupid?  Really?  That line is:
>>
>> shipmentRouteSegments=delegator.findByAnd("ShipmentRouteSegment",
>> {"shipmentId" : shipment.shipmentId}, null, false) [on line 581,
>> column 25 in
>> component://order/webapp/ordermgr/order/ordershippinginfo.ftl]
>>
>> And there *is* a findByAnd in Delegator that has (String, Map, List,
>> boolean).  Why is thinking that findByAnd(String, Object...) is the
>> correct one to use?  I'm leaning towards this being a freemarker bug.
>>
>> If one other person agrees with me, then I'll attempt to simulate it
>> as a real freemark bug(new freemarker template, new object that
>> implements similiar interfaces, isolated from any/all ofbiz code), to
>> make reporting a freemark bug simpler.  And then fix freemarker myself.
> 
> Gah.  As a test, I tried placing the Object... variant last in both
> the interface and the class.  No change, it still picks the wrong method.
> 
> Velocity, Freemarker, Groovy, Asm, and other similiar tools all go
> from free-form text, to eventually call a method.  Every single tool
> needs to be the most correct method to call.  And they all implement
> their own way of figuring that out.  Does anyone know of something
> that does that correctly in a simple library?  There is nothing in the
> default java spec that does this(which is an oversite, imho).

Yes, absolute bug in freemarker.

s/null/[]/ in the ftl, and it picks the correct method.  I read the
freemarker code to come to a workaround.  But I do not want to commit
the workaround into ofbiz.

Reply via email to