groovy
  1. groovy
  2. GROOVY-4044

String subString(int,int) throws unexpected error.

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Blocker Blocker
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: 1.6.8
    • Component/s: Groovy Console
    • Labels:
      None
    • Environment:
      Windows XP SP3
    • Number of attachments :
      0

      Description

      int a = 1
      int b = 3

      "hello".subString(a ,b)

      OR

      "hello".subString(a as int,b as int)

        Activity

        Hide
        m b added a comment -

        Exception :

        Exception thrown: No signature of method: java.lang.String.subString() is applicable for argument types: (java.lang.Integer, java.lang.Integer) values: [1, 3]

        groovy.lang.MissingMethodException: No signature of method: java.lang.String.subString() is applicable for argument types: (java.lang.Integer, java.lang.Integer) values: [1, 3]

        at ConsoleScript13.run(ConsoleScript13:4)

        Show
        m b added a comment - Exception : Exception thrown: No signature of method: java.lang.String.subString() is applicable for argument types: (java.lang.Integer, java.lang.Integer) values: [1, 3] groovy.lang.MissingMethodException: No signature of method: java.lang.String.subString() is applicable for argument types: (java.lang.Integer, java.lang.Integer) values: [1, 3] at ConsoleScript13.run(ConsoleScript13:4)
        Hide
        Guillaume Laforge added a comment -

        The method is substring not subString. Notice the casing.

        Show
        Guillaume Laforge added a comment - The method is substring not subString. Notice the casing.

          People

          • Assignee:
            Guillaume Laforge
            Reporter:
            m b
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: