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

unexpected StringIndexOutOfBoundsException in javax.sql.rowset.serial.SerialClob

    XMLWordPrintable

Details

    • generic
    • generic

    Description

      A DESCRIPTION OF THE PROBLEM :
      The test failed with StringIndexOutOfBoundsException because you didn't judge the length before calling substring method.

      ACTUAL -
      java.lang.StringIndexOutOfBoundsException: String index out of range: -1

      at java.lang.String.substring(String.java:1927)
      at javax.sql.rowset.serial.SerialClob.setString(SerialClob.java:408)

      ---------- BEGIN SOURCE ----------
          @Test
          public void test_setString_119_125() throws java.sql.SQLException{
              long long1 = -1L;
              String string2 = "{\"key\":null}";
              int int3 = -1;
              int int4 = -1;
              char[] charArray5 = {'\''};
              javax.sql.rowset.serial.SerialClob serialClob0 = new javax.sql.rowset.serial.SerialClob(charArray5);
              serialClob0.setString(long1, string2, int3, int4);
          }
      ---------- END SOURCE ----------

      Attachments

        Issue Links

          Activity

            People

              lancea Lance Andersen
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: