QDox
  1. QDox
  2. QDOX-66

No support for wildcards in generics

    Details

    • Type: Improvement Improvement
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5
    • Fix Version/s: 1.6
    • Component/s: Parser
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Qdox lacks the ability to parse Generics with wildcards. I added the following test to GenericsTest.java, and it fails.

      public void testShouldUnderstandWildcard() {
      String source = "" +
      "public class Bar

      { private Class<? extends Date> klass; }

      ";
      builder.addSource(new StringReader(source));
      assertEquals("Bar", builder.getClassByName("Bar").getName());
      }

        Activity

        Mike Williams made changes -
        Field Original Value New Value
        Affects Version/s 1.7 [ 11160 ]
        Affects Version/s 1.6 [ 10814 ]
        Affects Version/s 1.5 [ 10650 ]
        Fix Version/s 1.6 [ 10814 ]
        Hide
        Marc Schneider added a comment -

        more problems with generics:
        I get ParseExceptions if I parse the following (legal) source snippets:

        private Map<String, Object> m_env = new HashMap<String, Object>();

        public <T extends Object> T retrieve(Class<T> klass, Object key)

        { return x; }
        Show
        Marc Schneider added a comment - more problems with generics: I get ParseExceptions if I parse the following (legal) source snippets: private Map<String, Object> m_env = new HashMap<String, Object>(); public <T extends Object> T retrieve(Class<T> klass, Object key) { return x; }
        Mike Williams made changes -
        Assignee Mike Williams [ mdub ]
        Hide
        Mike Williams added a comment -

        Marc: method type-parameters are separate to wildcard type-arguments ... I've split it into a new issue (QDOX-68).

        Show
        Mike Williams added a comment - Marc: method type-parameters are separate to wildcard type-arguments ... I've split it into a new issue ( QDOX-68 ).
        Mike Williams made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Mike Williams made changes -
        Type Bug [ 1 ] Improvement [ 4 ]
        Hide
        Mike Williams added a comment -

        Wildcards are working, now.

        Show
        Mike Williams added a comment - Wildcards are working, now.
        Mike Williams made changes -
        Resolution Fixed [ 1 ]
        Status In Progress [ 3 ] Resolved [ 5 ]

          People

          • Assignee:
            Mike Williams
            Reporter:
            Scott Haug
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: