Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8236408

Judgment sequence adjustment

XMLWordPrintable

    • x86_64
    • windows_10

      A DESCRIPTION OF THE PROBLEM :
      in java.lang.String source code
      new String(char value[], int offset, int count) method
      if (count <= 0) {
                  if (count < 0) {
                      throw new StringIndexOutOfBoundsException(count);
                  }if (offset <= value.length) {
                      this.value = "".value;
                      return;
                  }
              }
      appear duplicate Judgment.on change
      if (count < 0) {
                      throw new StringIndexOutOfBoundsException(count);
                  }
      if(count == 0){ }
      efficiency will be better



            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: