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

Remove redundant subString endIndex .length() calls

XMLWordPrintable

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

      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.

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

                Created:
                Updated:
                Resolved: