Bug 39284 - fn:endsWith('abcda', 'a') returns false
Summary: fn:endsWith('abcda', 'a') returns false
Alias: None
Product: Taglibs
Classification: Unclassified
Component: Standard Taglib (show other bugs)
Version: nightly
Hardware: All All
: P2 major (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Keywords: PatchAvailable
: 50057 (view as bug list)
Depends on:
Reported: 2006-04-12 16:32 UTC by Jochen Metzinger
Modified: 2010-10-07 20:46 UTC (History)
1 user (show)

Use String#endsWith (647 bytes, patch)
2006-04-12 16:32 UTC, Jochen Metzinger
Details | Diff
Unit test for endsWith bug. (2.69 KB, patch)
2006-11-22 16:07 UTC, Bjorn Townsend
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jochen Metzinger 2006-04-12 16:32:01 UTC
If the suffix occurs more than once fn:endsWith returns false
Comment 1 Jochen Metzinger 2006-04-12 16:32:52 UTC
Created attachment 18084 [details]
Use String#endsWith
Comment 2 Bjorn Townsend 2006-11-22 16:07:37 UTC
Created attachment 19163 [details]
Unit test for endsWith bug.

It appears that this bug was also tracked in bugzilla-32896 and fixed in svn
r218357.  Here's a patch for the taglibs unit tests that checks this fix. 

It looks to me that Jochen's suggestion is a simpler fix for this issue, so one
might consider applying his fix.
Comment 3 Henri Yandell 2006-11-29 10:33:56 UTC
Applied both attachments:

svn ci -m "Applying the unit test from #39284 from Bjorn Townsend" test/
Sending        build-tests.xml
Adding         test/org/apache/taglibs/standard/functions
Adding         test/org/apache/taglibs/standard/functions/TestEndsWith.java
Adding         test/web/org/apache/taglibs/standard/functions
Adding         test/web/org/apache/taglibs/standard/functions/TestEndsWith.jsp
Transmitting file data ...
Committed revision 480669.

svn ci -m "Applying the fix from Jochen Metzinger in #39284 - the existing code
was already fixed, but this seems like a worthwhile simplification"
Sending        src/org/apache/taglibs/standard/functions/Functions.java
Transmitting file data .
Committed revision 480670.
Comment 4 Jeremy Boynes 2010-10-07 20:46:48 UTC
*** Bug 50057 has been marked as a duplicate of this bug. ***