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

Compiler will not stop when compiling anonymous class that uses private method.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.1.3
    • tools
    • None
    • x86
    • windows_95



      Name: diC59631 Date: 08/25/97


      Product: JDK1.1.1, 1.1.2, 1.1.3 on Linux and Windows.
      The following program cannot be compiled:

      // test.java

      import java.applet.*;
      import java.io.*;

      public class test extends Applet {
        StringBuffer lineBuffer;
        int ptr;

        public void init() {
          lineBuffer = new StringBuffer();
          ptr = 0;
        }
        public void run() {
          InputStream stream = new InputStream() {
            public int read() throws IOException {
              test.this.processInterrupt();
              while (lineBuffer.length() <= ptr) test.this.inputLine();
              return lineBuffer.charAt(ptr++);
            }
          };
        }
        public synchronized void inputLine() {}
        private void processInterrupt() {}
      }

      company - Oregon State University , email - ###@###.###
      ======================================================================

            wmaddoxsunw William Maddox (Inactive)
            dindrigo Daniel Indrigo (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: