If the suffix occurs more than once fn:endsWith returns false
Created attachment 18084 [details] Use String#endsWith
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.
Applied both attachments: svn ci -m "Applying the unit test from #39284 from Bjorn Townsend" test/ build-tests.xml 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" src/org/apache/taglibs/standard/functions/Functions.java Sending src/org/apache/taglibs/standard/functions/Functions.java Transmitting file data . Committed revision 480670.
*** Bug 50057 has been marked as a duplicate of this bug. ***