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

compiling a class that doesn't implement an interface causes an exception

XMLWordPrintable

    • 0.9friends
    • sparc
    • solaris_2.4
    • Not verified

      Compiling the following program with oakc causes a NullPointerException:

      interface bar {
      abstract void doBar();
      }

      class foo implements bar {
      public foo() {
      }
      static void main(String args[]) {
      foo f = new foo();
      }
      }


      oakc foo.oak
      oak.lang.NullPointerException
      at oak.tools.oak.ClassDefinition.addAbstractFields(ClassDefinition.oak:166)
      at oak.tools.oak.ClassDefinition.getAbstractFields(ClassDefinition.oak:181)
      at oak.tools.oak.ClassDefinition.isAbstract(ClassDefinition.oak:153)
      at oak.tools.tree.NewInstanceExpression.checkValue(NewInstanceExpression.oak)
      at oak.tools.tree.Expression.checkInitializer(Expression.oak)
      at oak.tools.tree.VarDeclarationStatement.checkDeclaration(VarDeclarationStatement.oak)
      at oak.tools.tree.DeclarationStatement.check(DeclarationStatement.oak)
      at oak.tools.tree.CompoundStatement.check(CompoundStatement.oak)
      at oak.tools.tree.Statement.checkMethod(Statement.oak)
      at oak.tools.oakc.SourceField.check(SourceField.oak)
      oakc: an exception has occurred, please contact x47242.

            ahoffsunw Arthur Hoff (Inactive)
            sshaiosunw Sami Shaio (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: