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

Wildcard initialization order produced confusing code

XMLWordPrintable

    • generic
    • generic

      Because WildcardType.bound may not be initialized before a wildcard
      is used in a subtype question, the following code is used to determine
      the upper bound of super bounded wildcards:

        WildcardType w = (WildcardType)t;
        w.bound == null ? syms.objectType : w.bound.bound;

      This is unfortunate and should be addressed by rethinking how wildcards
      are set up.

            Unassigned Unassigned
            ahe Peter Ahe
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: