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

test failed with unexpected StringIndexOutOfBoundsException in com.sun.org.apache.bcel.internal.util.Class2HTML

XMLWordPrintable

    • generic
    • generic

      A DESCRIPTION OF THE PROBLEM :
      in method com.sun.org.apache.bcel.internal.util.Class2HTML._main:
      when calling argv[i].charAt(0), you should judge argv[i].isEmpty();

      such issue is also in https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8279129

      ACTUAL -
      java.lang.StringIndexOutOfBoundsException: String index out of range: 0
      java.lang.StringIndexOutOfBoundsException: String index out of range: 0
      at java.lang.String.charAt(String.java:658)
      at com.sun.org.apache.bcel.internal.util.Class2HTML._main(Class2HTML.java:148)

      ---------- BEGIN SOURCE ----------
          @Test
          public void test__main(){
              String[] stringArray0 = {"i53tfnIq_68", "", " #", "^[1]([3-9])[0-9]{9}$"};
              com.sun.org.apache.bcel.internal.util.Class2HTML._main(stringArray0);
          }
      ---------- END SOURCE ----------

      FREQUENCY : occasionally


            joehw Joe Wang
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: