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

Field resolution does not look up the interface hierarchy

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      kestrel
    • CPU:
      generic
    • OS:
      generic

      Description



      Name: dkC59003 Date: 09/13/99



      Kestrel HotSpot fails the test nsk/regression/b4257281. The test is based on
      the bugreport #4257281 which is marked integrated in Kestrel on Aug 27.
      HotSparc on Solaris and classic both on Solaris and winNT fail with NoSuchFieldError
      whereas HotSpot on winNT throws NullPointerException.
      Logs and test sources follow:

      On winNT:

      java -version
      java version "1.3.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-E)
      Java(TM) HotSpot Client VM (build 1.3FCS-E, mixed mode)

      java b4257281
      Exception in thread "main" java.lang.NullPointerException
              at b4257281.run(g:/ld24/java/dima/testbase/src/nsk/regression/b4257281/b4257281.java:16)
              at b4257281.main(g:/ld24/java/dima/testbase/src/nsk/regression/b4257281/b4257281.java:11)

      On Solaris:

      java -version
      java version "1.3.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-E)
      Java(TM) HotSpot Client VM (build 1.3beta-E-release, 1.3beta-E-release, interpreted mode)

      java b4257281
      Exception in thread "main" java.lang.NoSuchFieldError: fld
              at b4257281.run(b4257281.java:16)
              at b4257281.main(b4257281.java:11)

      ------------------------------------------------------------- b4257281_p.java
      package p;

      interface b4257281_p {
          static public int fld[] = {5,10};
      }
      ------------------------------------------------------------- b4257281_c.java
      package p;

      public interface b4257281_c extends b4257281_p {}
      ------------------------------------------------------------- b4257281.java
      import java.io.PrintStream;

      import p.b4257281_c;

      public class b4257281 implements b4257281_c {

          public static void main(String argv[]) {
      System.exit(run(argv, System.out) + 95/*STATUS_TEMP*/);
          }

          public static int run(String argv[], PrintStream out) {
      b4257281 b = new b4257281();
      if (b.fld[0] == 5 && b4257281_c.fld[0] == 5) {
      return 0/*STATUS_PASSED*/;
      }
      return 2/*STATUS_FAILED*/;
         }
      }

      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              smitrovisunw Srdjan Mitrovic (Inactive)
              Reporter:
              dkhukhrosunw Dmitry Khukhro (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: