[ http://issues.apache.org/jira/browse/VELOCITY-350?page=all ]
Will Glass-Husain updated VELOCITY-350:
---------------------------------------
Bugzilla Id: (was: 33322)
Fix Version: 1.5
Description:
This was discussed on the dev list a few weeks ago. If two objects being
compared are of different (non-numeric) classes, I'd like to see equality be
based on toString (rather than just be false). This just makes sense in a
template environment where types are not visible to template writers, and is
also the way that JSTL/JSP 2.0 works. This is particularly useful when
comparing a literal String to a class implementing Bloch's Typesafe
Enumeration pattern [1] or a StringBuffer.
Comments welcome.
[1]
http://java.sun.com/developer/Books/shiftintojava/
was:
This was discussed on the dev list a few weeks ago. If two objects being
compared are of different (non-numeric) classes, I'd like to see equality be
based on toString (rather than just be false). This just makes sense in a
template environment where types are not visible to template writers, and is
also the way that JSTL/JSP 2.0 works. This is particularly useful when
comparing a literal String to a class implementing Bloch's Typesafe
Enumeration pattern [1] or a StringBuffer.
Comments welcome.
[1]
http://java.sun.com/developer/Books/shiftintojava/
Environment:
Operating System: Windows XP
Platform: PC
was:
Operating System: Windows XP
Platform: PC
Assign To: (was: Velocity-Dev List)
> Base Equality on toString() when operands are of different classes
> ------------------------------------------------------------------
>
> Key: VELOCITY-350
> URL: http://issues.apache.org/jira/browse/VELOCITY-350
> Project: Velocity
> Type: Bug
> Components: Source
> Versions: 1.5
> Environment: Operating System: Windows XP
> Platform: PC
> Reporter: Will Glass-Husain
> Fix For: 1.5
>
> This was discussed on the dev list a few weeks ago. If two objects being
> compared are of different (non-numeric) classes, I'd like to see equality be
> based on toString (rather than just be false). This just makes sense in a
> template environment where types are not visible to template writers, and is
> also the way that JSTL/JSP 2.0 works. This is particularly useful when
> comparing a literal String to a class implementing Bloch's Typesafe
> Enumeration pattern [1] or a StringBuffer.
> Comments welcome.
> [1]
> http://java.sun.com/developer/Books/shiftintojava/
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]