Issue Type: Bug Bug
Affects Versions: 1.12
Assignee: Unassigned
Components: Parser
Created: 13/Dec/12 11:04 AM
Description:

QDox doesn't seem to correctly parse a methods parameters when resolving nested generic types. The following failing unit test should illustrate the issue:

QDoxTest.java
import com.thoughtworks.qdox.JavaDocBuilder;
import com.thoughtworks.qdox.model.JavaClass;
import com.thoughtworks.qdox.model.JavaMethod;

public class QDoxTest extends junit.framework.TestCase {

    final JavaDocBuilder builder = new JavaDocBuilder();
    
    public void
    testReadsGenerifiedParameterTypes() {
        final String sourceCode = "" +
                "package foo;\n" +
                "public static class DummyOne {\n" +
                "  public static String withGenerifiedParam(java.util.Collection<? extends Comparable<String>> things) { return null; }\n" +
                "}\n";
        
        builder.addSource(new java.io.StringReader(sourceCode));
        JavaClass qDoxClass = builder.getClassByName("foo.DummyOne");
        JavaMethod qDoxMethod = qDoxClass.getMethods()[0];
        
        String result = qDoxMethod.getParameterTypes(true)[0].getGenericValue();
        assertEquals("java.util.Collection<? extends java.lang.Comparable<java.lang.String>>", result);
    }
}
}

Project: QDox
Priority: Major Major
Reporter: Tom Denley
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

Reply via email to