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

arr.finalize() crashes compiler with CompilerError: getClassName:int[]

    XMLWordPrintable

Details

    • sparc
    • solaris_2.5

    Description



      Name: laC46010 Date: 01/12/97


      The test below causes compiler crash (both 1.1beta2 and 1.1beta3.2).
      JDK1.0.2 compiles it without any problem.

      -------------------t.java-------------------
      public class t {
        public static void main(String argv[])
        {
           t x = new t();
           int [] arr = new int[5];
           try {
           x.finalize();
           arr.finalize();
           } catch (Throwable e) {
           };
        }
      }
      --------------------------------------------
      /export/ld11/java/gvv/jdk1.1/build/bin/javac -d /tmp /tmp/t.java
      sun.tools.java.CompilerError: getClassName:int[]
      at sun.tools.java.Type.getClassName(Type.java)
      at sun.tools.java.ClassDefinition.protectedAccess(ClassDefinition.java)
      at sun.tools.tree.MethodExpression.checkValue(MethodExpression.java)
      at sun.tools.tree.MethodExpression.check(MethodExpression.java)
      at sun.tools.tree.ExpressionStatement.check(ExpressionStatement.java)
      at sun.tools.tree.CompoundStatement.check(CompoundStatement.java)
      at sun.tools.tree.TryStatement.check(TryStatement.java)
      at sun.tools.tree.CompoundStatement.check(CompoundStatement.java)
      at sun.tools.tree.Statement.checkMethod(Statement.java)
      at sun.tools.javac.SourceField.check(SourceField.java)
      at sun.tools.javac.SourceClass.checkFields(SourceClass.java)
      at sun.tools.javac.SourceClass.checkInternal(SourceClass.java)
      at sun.tools.javac.SourceClass.check(SourceClass.java)
      at sun.tools.javac.Main.compile(Main.java)
      at sun.tools.javac.Main.main(Main.java)
      error: An error has occurred in the compiler; please file a bug report (###@###.###).
      1 error


      ======================================================================

      Attachments

        Activity

          People

            Unassigned Unassigned
            leosunw Leo Leo (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: