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

If class resolution fails in one file, retry resolution step in subsequent files

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 1.2.0
    • Fix Version/s: None
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_nt

      Description



      Name: wm38563 Date: 10/28/98


      Consider the following two classes:

      Test.java
      ---
      package test;

      import java.util.*;

      public class Test {
      public static void main(String[] args) {
      System.out.println(Locale.US);
      }
      }

      Test2.java
      ---
      package test;
      //import java.util.*;
      class Test2 {
      Locale locale = null;
      }

      Issuing the command "javac test\Test.java test\Test2.java"
      results in a single compiler error in Test2, line 6.
      "Class test.Locale not found". If, however, you issue the
      command "javac test\Test2.java test\Test.java" you get
      three errors, the correct Test2 line 6 error, and two spurious
      errors in Test, line 7 -- "Class test.Locale not found" and
      "Undefined variable or class name: Locale". Clearly, the
      order of compilation should not effect the validity of the code.

      If a class resolution fails in the one file, it should retry the class
      resolution step in subsequent ones. It certainly should not spit
      out an incorrect error message.
      (Review ID: 40078)
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              tturnidgsunw Todd Turnidge (Inactive)
              Reporter:
              wmaddoxsunw William Maddox (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: