Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-12152

Remove redundant subString endIndex .length() calls

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Done
    • Optional
    • 17.0.0.Final
    • None
    • None
    • None

    Description

      Remove all instances of redundant .length() calls in the String substring calls.
      Both the following samples produce the same output:

      str2 = str1.substring(beginIndex, str1.length());
      str2 = str1.substring(beginIndex);
      

      This minor enhancement removes unnecessary String length() calls.

      Attachments

        Activity

          People

            bstansbe@redhat.com Brian Stansberry
            williamcollishaw William Collishaw (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: