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

REGRESSION: javac error on files named java.java

XMLWordPrintable

    • mantis
    • x86
    • windows_2000



      Name: rmT116609 Date: 07/11/2002


      FULL PRODUCT VERSION :
      java version "1.4.1-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-beta-b14)
      Java HotSpot(TM) Client VM (build 1.4.1-beta-b14, mixed mode)


      DESCRIPTION OF THE PROBLEM :

      javac error on files named java.java

      Source Code:
      -----------

      public class java
      {
      static lang lang = new lang();
      static class lang {
      static Object Object = new Object();
      public static Object Object(Object o) {
      return o;
      }
      static class Object {}
      }

          public static void main (String[] args) {
      java.lang.Object Object = (java.lang.Object)java.lang.Object
      (java.lang.Object);
          }
      }

      2)

      C:\>javac java.java
      An exception has occurred in the compiler (1.4.1-beta). Please file a bug at the
       Java Developer Connection (http://java.sun.com/cgi-bin/bugreport.cgi) after ch
      ecking the Bug Parade for duplicates. Include your program and the following dia
      gnostic in your report. Thank you.
      java.lang.NullPointerException
              at com.sun.tools.javac.v8.comp.Flow.visitApply(Flow.java:906)
              at com.sun.tools.javac.v8.tree.Tree$Apply.accept(Tree.java:880)
              at com.sun.tools.javac.v8.comp.Flow.analyze(Flow.java:409)
              at com.sun.tools.javac.v8.comp.Flow.analyzeExpr(Flow.java:428)
              at com.sun.tools.javac.v8.comp.Flow.visitExec(Flow.java:864)
              at com.sun.tools.javac.v8.tree.Tree$Exec.accept(Tree.java:776)
              at com.sun.tools.javac.v8.comp.Flow.analyze(Flow.java:409)
              at com.sun.tools.javac.v8.comp.Flow.analyzeStat(Flow.java:483)
              at com.sun.tools.javac.v8.comp.Flow.analyzeStats(Flow.java:502)
              at com.sun.tools.javac.v8.comp.Flow.visitBlock(Flow.java:632)
              at com.sun.tools.javac.v8.tree.Tree$Block.accept(Tree.java:550)
              at com.sun.tools.javac.v8.comp.Flow.analyze(Flow.java:409)
              at com.sun.tools.javac.v8.comp.Flow.analyzeStat(Flow.java:483)
              at com.sun.tools.javac.v8.comp.Flow.visitMethodDef(Flow.java:597)
              at com.sun.tools.javac.v8.tree.Tree$MethodDef.accept(Tree.java:485)
              at com.sun.tools.javac.v8.comp.Flow.analyze(Flow.java:409)
              at com.sun.tools.javac.v8.comp.Flow.analyzeDef(Flow.java:468)
              at com.sun.tools.javac.v8.comp.Flow.visitClassDef(Flow.java:551)
              at com.sun.tools.javac.v8.tree.Tree$ClassDef.accept(Tree.java:446)
              at com.sun.tools.javac.v8.comp.Flow.analyze(Flow.java:409)
              at com.sun.tools.javac.v8.comp.Flow.analyzeDef(Flow.java:468)
              at com.sun.tools.javac.v8.comp.Flow.visitClassDef(Flow.java:526)
              at com.sun.tools.javac.v8.tree.Tree$ClassDef.accept(Tree.java:446)
              at com.sun.tools.javac.v8.comp.Flow.analyze(Flow.java:409)
              at com.sun.tools.javac.v8.comp.Flow.analyzeDef(Flow.java:468)
              at com.sun.tools.javac.v8.comp.Flow.visitClassDef(Flow.java:526)
              at com.sun.tools.javac.v8.tree.Tree$ClassDef.accept(Tree.java:446)
              at com.sun.tools.javac.v8.comp.Flow.analyze(Flow.java:409)
              at com.sun.tools.javac.v8.comp.Flow.analyzeDef(Flow.java:468)
              at com.sun.tools.javac.v8.comp.Flow.analyzeTree(Flow.java:1041)
              at com.sun.tools.javac.v8.JavaCompiler.compile(JavaCompiler.java:367)
              at com.sun.tools.javac.v8.Main.compile(Main.java:523)
              at com.sun.tools.javac.Main.compile(Main.java:39)
              at com.sun.tools.javac.Main.main(Main.java:30)

      With JDK1.3.1_04:
      -----------------
      C:\>javac java.java
      java.java:1: java clashes with package of same name
      public class java
             ^
      1 error


      REPRODUCIBILITY :
      This bug can be reproduced always.

      Release Regression From : 1.3.1_04
      The above release value was the last known release where this
      bug was known to work. Since then there has been a regression.

      (Review ID: 159214)
      ======================================================================

            gafter Neal Gafter (Inactive)
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: