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

missing type parameter in class file

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 5.0
    • tools
    • generic
    • solaris_8

      frog:~/workspaces/test/New107 $ cat -n T.java
           1 import java.util.*;
           2
           3 class T {
           4 static {
           5 Collections.EmptySet t = null;
           6 }
           7 }
      frog:~/workspaces/test/New107 $ newjavac T.java
      + exec /usr/java1.5/bin/javac -J-esa -source 1.5 -target 1.4 T.java
      T.java:5: cannot access java.util.Collections.EmptySet
      bad class file: /usr/java1.5/jre/lib/rt.jar/java/util/Collections$EmptySet.class
      undeclared type variable: E
      Please remove or make sure it appears in the correct subdirectory of the classpath.
              Collections.EmptySet t = null;
                         ^
      1 error
      frog:~/workspaces/test/New107 $

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: