[
https://issues.jboss.org/browse/ROASTER-45?page=com.atlassian.jira.plugin...
]
George Gastaldi updated ROASTER-45:
-----------------------------------
Steps to Reproduce:
{code}
public class TestRoaster
{
public static void main(String[] args)
{
JavaClassSource src = Roaster.create(JavaClassSource.class);
src.addProperty("java.util.List<java.lang.String>",
"list1"); // fail
src.addProperty("java.util.List<String>", "list2"); //
correct
src.addProperty("java.util.List<java.math.BigDecimal>",
"list3"); // fail
src.addProperty("java.util.List<java.util.List<String>",
"list4"); // fail
}
}
{code}
was:Committed ignored tests in
https://github.com/forge/roaster/commit/adbe1f671
Using generic list with className
---------------------------------
Key: ROASTER-45
URL:
https://issues.jboss.org/browse/ROASTER-45
Project: Roaster
Issue Type: Bug
Components: JDT
Affects Versions: 2.9.0.Final
Environment: Window 7 x64_86
Reporter: Nicolas Challut
Fix For: 2.x Future
If you use a generic with class name, an exception is thrown :
{code}
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 0, Size:
0
at java.util.ArrayList.rangeCheck(ArrayList.java:635)
at java.util.ArrayList.get(ArrayList.java:411)
at java.util.Collections$UnmodifiableList.get(Collections.java:1211)
at org.jboss.forge.roaster.model.impl.FieldImpl.setType(FieldImpl.java:345)
at
org.jboss.forge.roaster.model.impl.PropertyImpl.createField(PropertyImpl.java:215)
at
org.jboss.forge.roaster.model.impl.AbstractJavaSourceMemberHolder.addProperty(AbstractJavaSourceMemberHolder.java:511)
at core.TestRoaster.main(TestRoaster.java:14)
{code}
--
This message was sent by Atlassian JIRA
(v6.3.8#6338)