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

Bogus definite assignment error followed by crash inside inner class

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.3.1
    • 1.3.0
    • tools
    • ladybird
    • generic
    • generic
    • Verified

        public class Test extends Object {
            private static final java.beans.PropertyChangeListener listener =
                new java.beans.PropertyChangeListener() {
        public void propertyChange (java.beans.PropertyChangeEvent ev) { }
        public void xwait(javax.swing.JComponent obj) {
        obj.removePropertyChangeListener(listener);
        }
            };
        }

        Test.java:6: variable obj might not have been initialized
        obj.removePropertyChangeListener(listener);
                        ^
        An exception has occurred in the compiler (1.3.0rc1). Please file a bug at the Java Developer Connection (http://java.sun.com/cgi-bin/bugreport.cgi). Include your program and the following diagnostic in your report. Thank you.
        java.lang.InternalError: assertion failed
        at com.sun.tools.javac.v8.util.Util.assert(Util.java:25)
        at com.sun.tools.javac.v8.util.Bits.incl(Bits.java:65)
        at com.sun.tools.javac.v8.comp.Flow.checkInit(Flow.java:184)
        at com.sun.tools.javac.v8.comp.Flow._case(Flow.java:843)
        at com.sun.tools.javac.v8.tree.Tree$Ident.visit(Tree.java:983)
        at com.sun.tools.javac.v8.comp.Flow.analyze(Flow.java:321)
        at com.sun.tools.javac.v8.comp.Flow.analyzeExpr(Flow.java:339)
        at com.sun.tools.javac.v8.comp.Flow._case(Flow.java:848)
        at com.sun.tools.javac.v8.tree.Tree$Select.visit(Tree.java:963)
        at com.sun.tools.javac.v8.comp.Flow.analyze(Flow.java:321)
        at com.sun.tools.javac.v8.comp.Flow.analyzeExpr(Flow.java:339)
        at com.sun.tools.javac.v8.comp.Flow._case(Flow.java:744)
        at com.sun.tools.javac.v8.tree.Tree$Apply.visit(Tree.java:785)
        at com.sun.tools.javac.v8.comp.Flow.analyze(Flow.java:321)
        at com.sun.tools.javac.v8.comp.Flow.analyzeExpr(Flow.java:339)
        at com.sun.tools.javac.v8.comp.Flow._case(Flow.java:719)
        at com.sun.tools.javac.v8.tree.Tree$Exec.visit(Tree.java:699)
        at com.sun.tools.javac.v8.comp.Flow.analyze(Flow.java:321)
        at com.sun.tools.javac.v8.comp.Flow.analyzeStat(Flow.java:394)
        at com.sun.tools.javac.v8.comp.Flow.analyzeStats(Flow.java:413)
        at com.sun.tools.javac.v8.comp.Flow._case(Flow.java:520)
        at com.sun.tools.javac.v8.tree.Tree$Block.visit(Tree.java:492)
        at com.sun.tools.javac.v8.comp.Flow.analyze(Flow.java:321)
        at com.sun.tools.javac.v8.comp.Flow.analyzeStat(Flow.java:394)
        at com.sun.tools.javac.v8.comp.Flow._case(Flow.java:488)
        at com.sun.tools.javac.v8.tree.Tree$MethodDef.visit(Tree.java:441)
        at com.sun.tools.javac.v8.comp.Flow.analyze(Flow.java:321)
        at com.sun.tools.javac.v8.comp.Flow.analyzeDef(Flow.java:379)
        at com.sun.tools.javac.v8.comp.Flow._case(Flow.java:456)
        at com.sun.tools.javac.v8.tree.Tree$ClassDef.visit(Tree.java:402)
        at com.sun.tools.javac.v8.comp.Flow.analyze(Flow.java:321)
        at com.sun.tools.javac.v8.comp.Flow.analyzeDef(Flow.java:379)
        at com.sun.tools.javac.v8.comp.Flow._case(Flow.java:756)
        at com.sun.tools.javac.v8.tree.Tree$NewClass.visit(Tree.java:810)
        at com.sun.tools.javac.v8.comp.Flow.analyze(Flow.java:321)
        at com.sun.tools.javac.v8.comp.Flow.analyzeExpr(Flow.java:339)
        at com.sun.tools.javac.v8.comp.Flow._case(Flow.java:507)
        at com.sun.tools.javac.v8.tree.Tree$VarDef.visit(Tree.java:470)
        at com.sun.tools.javac.v8.comp.Flow.analyze(Flow.java:321)
        at com.sun.tools.javac.v8.comp.Flow.analyzeDef(Flow.java:379)
        at com.sun.tools.javac.v8.comp.Flow._case(Flow.java:445)
        at com.sun.tools.javac.v8.tree.Tree$ClassDef.visit(Tree.java:402)
        at com.sun.tools.javac.v8.comp.Flow.analyze(Flow.java:321)
        at com.sun.tools.javac.v8.comp.Flow.analyzeDef(Flow.java:379)
        at com.sun.tools.javac.v8.JavaCompiler.compile(JavaCompiler.java:380)
        at com.sun.tools.javac.v8.Main.compile(Main.java:247)
        at com.sun.tools.javac.Main.main(Main.java:16)

        william.maddox@Eng 2000-01-24

              gafter Neal Gafter (Inactive)
              wmaddoxsunw William Maddox (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: