[JBoss JIRA] (ROASTER-46) addAnnotation should add automatically import
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/ROASTER-46?page=com.atlassian.jira.plugin... ]
George Gastaldi updated ROASTER-46:
-----------------------------------
Description: It would be nice if the AnnotationSource could automatically import the Annotation class when setName is called. Also, a {{setName(Class<? extends Annotation>)}} should be provided (was: Besides, the last line should return a NPE)
> addAnnotation should add automatically import
> ---------------------------------------------
>
> Key: ROASTER-46
> URL: https://issues.jboss.org/browse/ROASTER-46
> Project: Roaster
> Issue Type: Bug
> Components: JDT
> Affects Versions: 2.9.0.Final
> Environment: Window 7 x86_64
> Reporter: Nicolas Challut
> Fix For: 2.x Future
>
>
> It would be nice if the AnnotationSource could automatically import the Annotation class when setName is called. Also, a {{setName(Class<? extends Annotation>)}} should be provided
--
This message was sent by Atlassian JIRA
(v6.3.8#6338)
10 years, 1 month
[JBoss JIRA] (FORGE-2138) Being able to add a @NamedQuery to an existing entity
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-2138?page=com.atlassian.jira.plugin... ]
George Gastaldi closed FORGE-2138.
----------------------------------
Assignee: George Gastaldi
Fix Version/s: 2.12.3.Final
(was: 2.x Future)
Resolution: Done
> Being able to add a @NamedQuery to an existing entity
> -----------------------------------------------------
>
> Key: FORGE-2138
> URL: https://issues.jboss.org/browse/FORGE-2138
> Project: Forge
> Issue Type: Sub-task
> Components: Java EE
> Affects Versions: 2.12.2.Final
> Reporter: Antonio Goncalves
> Assignee: George Gastaldi
> Fix For: 2.12.3.Final
>
>
> It would be useful to have a command to add a new JPA NamedQuery to an existing entity. A command such as :
> {code}
> jpa-new-named-query --named findAll --query select b from Book b
> {code}
> Would add to an existing entity the following code :
> {code}
> @Entity
> @NamedQueries({
> @NamedQuery(name = Book.FIND_ALL, query = "SELECT b FROM Book b")
> })
> public class Book implements Serializable
> {
> public static final String FIND_ALL = "Book.findAll";
> ...
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.8#6338)
10 years, 1 month
[JBoss JIRA] (FORGE-2151) cdi-new-interceptor doesn't generate an @AroundInvoke on the method
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-2151?page=com.atlassian.jira.plugin... ]
George Gastaldi updated FORGE-2151:
-----------------------------------
Status: Closed (was: Pull Request Sent)
Fix Version/s: 2.12.3.Final
(was: 2.x Future)
Resolution: Done
> cdi-new-interceptor doesn't generate an @AroundInvoke on the method
> -------------------------------------------------------------------
>
> Key: FORGE-2151
> URL: https://issues.jboss.org/browse/FORGE-2151
> Project: Forge
> Issue Type: Bug
> Components: Java EE
> Affects Versions: 2.12.2.Final
> Reporter: Antonio Goncalves
> Assignee: Antonio Goncalves
> Fix For: 2.12.3.Final
>
>
> The {{cdi-new-interceptor}} generates the following method :
> {code}
> private Object intercept(InvocationContext ic) throws Exception
> {
> try
> {
> return ic.proceed();
> }
> finally
> {
> }
> }
> {code}
> It misses an {{@AroundInvoke}}
> {code}
> @AroundInvoke
> private Object intercept(InvocationContext ic) throws Exception
> {
> try
> {
> return ic.proceed();
> }
> finally
> {
> }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.8#6338)
10 years, 1 month
[JBoss JIRA] (ROASTER-45) Using generic list with className
by Nicolas Challut (JIRA)
[ https://issues.jboss.org/browse/ROASTER-45?page=com.atlassian.jira.plugin... ]
Nicolas Challut updated ROASTER-45:
-----------------------------------
Steps to Reproduce:
{code:java}
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:
{code:java}
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}
> 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)
10 years, 1 month