Commons JEXL
  1. Commons JEXL
  2. JEXL-5

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

      Description

      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.

        Activity

        Hide
        dion gillard added a comment -

        Fixed in SVN as of today.
        Test added to JEXLTest.testStringMethods()

        Show
        dion gillard added a comment - Fixed in SVN as of today. Test added to JEXLTest.testStringMethods()
        Hide
        Henri Biestro added a comment -

        Bulk change resolved issues before JEXL 2.0.

        Show
        Henri Biestro added a comment - Bulk change resolved issues before JEXL 2.0.

          People

          • Assignee:
            Unassigned
            Reporter:
            Paul Libbrecht
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development