Comparing non-scalar values
Felix Gnass <[email protected]>
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <[email protected]> |
Hi guys, I just noticed that if I put two POJOs into my model (foo and bar), the expression "foo == bar" doesn't use the object's equals() method, but instead compares their string-representations. This behavior is explained in the documentation, which states that both sides must evaluate to a scalar. Yet it was totally unexpected for me and took quite long to find the error. I wonder whether it would be feasible to use the equals() method, in case the left-hand side of a comparison is an AdapterTemplateModel? What do you think? Best regards, -Felix ------------------------------------------------------------------------------ Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com