Bug 28954 - Internal compiler error -- assert statements in inner class
Summary: Internal compiler error -- assert statements in inner class
Status: RESOLVED DUPLICATE of bug 28750
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Linux-GTK
: P3 major (vote)
Target Milestone: 2.1 M5   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-02 14:46 EST by Andreas Kollegger CLA
Modified: 2003-01-17 07:42 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Kollegger CLA 2003-01-02 14:46:10 EST
Using the v2.1.0 M4 Eclipse Linux/GTK (Build Id: 200212181304) and Java 1.4
compliant compiling, the JavaBuilder fails with a NullPointerException when
trying to process a java source file with an inner class which uses assert
statements.

The exception is thrown down in...

java.lang.NullPointerException	at
org.eclipse.jdt.internal.compiler.ClassFile.addFieldInfo(ClassFile.java:434)	at
org.eclipse.jdt.internal.compiler.ClassFile.addFieldInfos(ClassFile.java:579)	at
org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.generateCode(TypeDeclaration.java:694)
...

Produced by as trivial an example as...
public class Foo
{
  public Foo()
  {
    super();
    assert (true) : "always true"; // no problem here
  }

  public class Bar
  {
    public Bar()
    {
      super();
      assert (true) : "always true"; // build fails here
    }
  }
}
Comment 1 Olivier Thomann CLA 2003-01-02 19:34:49 EST

*** This bug has been marked as a duplicate of 28750 ***