[
https://issues.jboss.org/browse/ROASTER-49?page=com.atlassian.jira.plugin...
]
George Gastaldi closed ROASTER-49.
----------------------------------
Assignee: George Gastaldi
Fix Version/s: 2.11.2.Final
Resolution: Done
Nevermind, fixed it and reproduced in a test case.
Don't forget to add {{javaClass.addImport(HashMap.class)}}.
Thanks for reporting this!
Impossible to create a field of type HashMap<Class<?>,
Object>
--------------------------------------------------------------
Key: ROASTER-49
URL:
https://issues.jboss.org/browse/ROASTER-49
Project: Roaster
Issue Type: Bug
Reporter: Yusuf Iskenderoglu
Assignee: George Gastaldi
Fix For: 2.11.2.Final
Roaster does not like question-mark-operator:
{code}
to.addField()
.setFinal(true)
.setName("AS_MAP")
.setPrivate()
.setStatic(true)
.setType("HashMap<Class<?>, Object>")
.setLiteralInitializer("new HashMap<>();");
{code}
cannot be used:
{verbatim}
Exception in thread "main" java.lang.IllegalArgumentException: Cannot parse
type parameter ?
at org.jboss.forge.roaster.model.util.Types.toSimpleName(Types.java:196)
at org.jboss.forge.roaster.model.util.Types.toSimpleName(Types.java:198)
at org.jboss.forge.roaster.model.impl.FieldImpl.setType(FieldImpl.java:334)
:support:main:roastJavaExecTask FAILED
{verbatim}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)