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

StringIndexOutOfBoundsException with empty input in JCodeModel.parseType

XMLWordPrintable

    • generic
    • generic

      A DESCRIPTION OF THE PROBLEM :
      The test case failed with StringIndexOutOfBoundsException

      ACTUAL -
      java.lang.StringIndexOutOfBoundsException: String index out of range: -1
      at java.lang.String.charAt(String.java:658)
      at jdk.jfr.internal.Utils.formatDataAmount(Utils.java:109)
      at jdk.jfr.internal.Utils.formatBitsPerSecond(Utils.java:151)

      ---------- BEGIN SOURCE ----------
          @Test
          public void test_parseType_1_2() throws ClassNotFoundException{

              String string1 = "";
              com.sun.codemodel.internal.JCodeModel jCodeModel0 = new com.sun.codemodel.internal.JCodeModel();
              jCodeModel0.parseType(string1);
          }
      ---------- END SOURCE ----------

      FREQUENCY : occasionally


            rreddy Ravi Reddy
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: