velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Colson \(tcolson\)" <>
Subject RE: Language Lawyer question (was: Re: syntax issue)
Date Fri, 26 Aug 2005 15:11:54 GMT
> > $
> > $foo.XXX
> > are the same if this happens to be a property access and
> > are different if this is a hashmap access.
> > Now that would be "gotcha!". ;-)

Yes, that's probably true. But I think this gotcha would be both a rare
border case, and the fault of the backend java developer. I mean, if
you're going to give the template $thingy and $ !=
$thingy.Name != $thingy.NAME != $thingy.NaMe... well, that's your own
problem when the template author is comfused! <grin>

> So that means it already is, in the case of $ and $foo.Xxx?
> (That was not a rhetorical question. I am still learning
> velocity and really curious to know.)
Honestly, I'm not entirely sure of the outcome because I've never put
objects into the template that have potential conflic based on case
sensitivity. The introspector tries to access data on the object in a
set order, and so I believe both of these would try traditional beanspec
case first and therefore find foo.getXxx() and then stop looking deeper.

I'm honestly too busy/lazy to code it up to test. :-)

I looked quickly in the docs/faq, but I didn't find info on exactly what
the default introspector does. Anybody else know if we've got that
somewhere? Or if which src file to have a look at? 


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message