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

dead cycle happened with com.sun.tools.corba.se.idl.toJavaPortable.Util.sansArrayInfo

XMLWordPrintable

    • generic
    • generic

      A DESCRIPTION OF THE PROBLEM :
      We generated a test case automatically. And it failed with dead cycle in com.sun.tools.corba.se.idl.toJavaPortable.Util.sansArrayInfo("[").
      Although this method is no longer available in jdk11, it still affects people who use jdk8.


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      The test case is :
      @Test
          public void test_sansArrayInfo(){
              String string0 = "[";
              com.sun.tools.corba.se.idl.toJavaPortable.Util.sansArrayInfo(string0);
          }

      ACTUAL -
      dead cycle

      ---------- BEGIN SOURCE ----------
      static public String sansArrayInfo (String name)
        {
          int index = name.indexOf ('[');
          if (index >= 0)
          {
            String array = name.substring (index);
            name = name.substring (0, index);
            while (!array.equals (""))
            {
              name = name + "[]";
              array = array.substring (array.indexOf (']') + 1);
            }
          }
          return name;
        }
      ---------- END SOURCE ----------


            coffeys Sean Coffey
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: