[
https://jira.codehaus.org/browse/QDOX-239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=294230#comment-294230
]
Robert Scholte commented on QDOX-239:
-------------------------------------
Issue confirmed. QDox-2.0 has faced a huge refactoring, so I had to rewrite the
test.
The suggested fix won't work anymore, but with this test I have enough info to
fix the issue.
> Type.actualArgumentTypes aren't resolved when field declared with wildcard
> generic
> ----------------------------------------------------------------------------------
>
> Key: QDOX-239
> URL: https://jira.codehaus.org/browse/QDOX-239
> Project: QDox
> Issue Type: Bug
> Affects Versions: 1.12
> Reporter: Evgen Vidolob
>
> Simple test:
> {code}
> public void testFieldWithWildcardType()
> {
> JavaDocBuilder javaDocBuilder = new JavaDocBuilder();
> StringBuilder b = new StringBuilder("package test;\n");
> b.append("import java.util.ArrayList;\n");
> b.append("import java.util.Map;\n");
> b.append("public class TestClass<E>{\n");
> b.append("public ArrayList<? extends Map<String, E>> list;\n}");
> javaDocBuilder.addSource(new StringReader(b.toString()));
> JavaClass javaClass = javaDocBuilder.getClasses()[0];
> JavaField field = javaClass.getFields()[0];
>
> assertNotNull(field.getType().getActualTypeArguments()[0].getActualTypeArguments());
> assertEquals("? extends java.util.Map<java.lang.String,E>",
> field.getType().getActualTypeArguments()[0].getGenericValue());
> }
> {code}
> Seems, type arguments lost in
> com.thoughtworks.qdox.parser.structs.WildcardTypeDef.
> I add this row
> {code}
> this.actualArgumentTypes = typeDef.actualArgumentTypes;
> {code}
> to constructor and it's work for me.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
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