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

javac sun.tools.java.CompilerError: addReference PageDir this

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P5 P5
    • None
    • 1.1.1
    • tools
    • None
    • x86
    • windows_nt



      Name: tb29552 Date: 06/23/97


      2. SOURCE CODE
      //#####################################################################
      // PageDir.java :: a class which manages list of web page files
      //
      // History:
      // original Roger Mosher May 22,1997
      //#####################################################################
      import java.util.Vector;
      import java.awt.*;
      import java.io.*;
       
      class PageDir {

      // instance variables
      //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      String dirPath; // full pathname of the directory
      String fileExt; // page file extension (.crs/.wks)

      int nEntries, curEntry; // number of entries, current entry
      final int NOTFND = (-1);

      byte dirtyBit; // if changed, needs to be rewritten
      final int CLEAN = 0;
      final int DIRTY = NOTFND;

      List pageList;
      Label msgArea;

      // constructor
      //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      PageDir(String workDir,String type, List aList, Label msg) {

      // Save args
      //=========================================
      dirPath = workDir;
      fileExt = type;
      pageList = aList;
      msgArea = msg;

      // Init some vars
      //=========================================
      nEntries = 0; curEntry = NOTFND;
      dirtyBit = CLEAN;

      // load the directory
      //=========================================
      loadDir();

      } // end constructor PageDir(String, String, List);

      // functions
      //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

      public void loadDir() {
      String dirName;
      BufferedReader pageDirReader;

      // construct directory name
      //---------------------------------------------
      if (fileExt == ".crs") dirName = dirPath+"Course.dir";
      else dirName = dirPath+"Workshop.dir";

      // open the directory for reading
      //---------------------------------------------
      try {
      pageDirReader = new BufferedReader(new FileReader(dirName));
      }
      catch (FileNotFoundException e) {
      msg.setText("ERROR: Could not open "+dirName);
      return;
      }

      // read each entry into the list provided
      //-----------------------------------------------
      pageList.removeAll(); //start with an empty list

      int cnt = 0;
      String tmpstr;
      try {
      while(tmpStr=pageDirReader.readLine()) {
      pageList.addItem(tmpStr);
      }
      } catch(IOException e) {
      msg.setText("ERROR: Could not read "+dirName);
      return;
      }

      pageDirReader.close();
      } // end function loadDir


      public void saveDir() {

      } // end function saveDir


      public void active(boolean On) {

      } // end function active

      public void insert(String name, boolean On) {

      } // end function insert



      } // end class PageDir

      3,4: ERROR MESSAGE, TRACE INFO

      C:\jdk1.1.1\bin\javac.exe -deprecation PageDir.java...
      File Compiled...

      --------------------------- Javac Output ---------------------------
      sun.tools.java.CompilerError: addReference PageDir this
      at sun.tools.java.ClassDefinition.addReference(ClassDefinition.java:1077)
      at sun.tools.java.ClassDefinition.getReference(ClassDefinition.java:1072)
      at sun.tools.tree.Context.noteReference(Context.java:308)
      at sun.tools.tree.Context.makeReference(Context.java:329)
      at sun.tools.tree.ThisExpression.checkValue(ThisExpression.java:76)
      at sun.tools.tree.MethodExpression.checkValue(MethodExpression.java:275)
      at sun.tools.tree.MethodExpression.check(MethodExpression.java:340)
      at sun.tools.tree.ExpressionStatement.check(ExpressionStatement.java:46)
      at sun.tools.tree.Statement.checkBlockStatement(Statement.java:120)
      at sun.tools.tree.CompoundStatement.check(CompoundStatement.java:70)
      at sun.tools.tree.Statement.checkMethod(Statement.java:98)
      at sun.tools.javac.SourceField.check(SourceField.java:402)
      at sun.tools.javac.SourceClass.checkFields(SourceClass.java:852)
      at sun.tools.javac.SourceClass.checkInternal(SourceClass.java:615)
      at sun.tools.javac.SourceClass.check(SourceClass.java:566)
      at sun.tools.javac.Main.compile(Main.java:318)
      at sun.tools.javac.Main.main(Main.java:473)
      error: An error has occurred in the compiler; please file a bug report (http://java.sun.com/cgi-bin/bugreport.cgi).
      1 error


      -----------------------------------------------------------------------------
      Double click on the line with file name
      and error number to locate the error.
      company - college of geographic sciences , email - ###@###.###
      ======================================================================

            tturnidgsunw Todd Turnidge (Inactive)
            tbell Tim Bell
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: