Issue Details (XML | Word | Printable)

Key: JEXL-5
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Paul Libbrecht
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Commons JEXL

[jexl] 'abc'.substring(0,1+1) is empty (method matching problem!)

Created: 23/Dec/04 08:08 PM   Updated: 16/May/06 11:38 AM
Return to search
Component/s: None
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

Environment:
Operating System: All
Platform: All

Bugzilla Id: 32829


 Description  « Hide
This looks to be a method matching bug.
'abc'.substring(0,1+1) is empty
'abc'.substring(0,2) gives ab as expected.
The problem seems to be the fact that the result of 1+1 (or any arithmetic operation) is a Long and that
long cannot be fed into substring but no attempt to cast the Long to int is done.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
dion gillard added a comment - 29/Jun/05 12:43 AM
Fixed in SVN as of today.
Test added to JEXLTest.testStringMethods()