[
https://issues.apache.org/jira/browse/TAP5-2029?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14499381#comment-14499381
]
Jochen Kemnade commented on TAP5-2029:
--------------------------------------
This seems to have more unforeseen consequences: I just got an
{{AnnotationFormatError}} in a Spock test:
{code}
java.lang.annotation.AnnotationFormatError: Duplicate annotation for class:
interface java.lang.Deprecated: @java.lang.Deprecated()
at
java.beans.PropertyDescriptor.setReadMethod(PropertyDescriptor.java:260)
at java.beans.PropertyDescriptor.<init>(PropertyDescriptor.java:159)
at java.beans.Introspector.getTargetPropertyInfo(Introspector.java:512)
at java.beans.Introspector.getBeanInfo(Introspector.java:428)
at java.beans.Introspector.getBeanInfo(Introspector.java:173)
at unit.DatabaseSpec.Load an item from the
database(unit.DatabaseSpec.groovy:165)
{code}
The problem is caused by a service method that has a {{@Deprecated}} annotation
on both the interface and the implementation methods.
> Copy annotations from service implementation to proxy (was JPA annotations
> expose implementation details in service interfaces)
> -------------------------------------------------------------------------------------------------------------------------------
>
> Key: TAP5-2029
> URL: https://issues.apache.org/jira/browse/TAP5-2029
> Project: Tapestry 5
> Issue Type: Improvement
> Components: tapestry-ioc
> Affects Versions: 5.3.6, 5.4
> Reporter: John Coleman
> Assignee: Thiago H. de Paula Figueiredo
> Priority: Minor
> Labels: month-of-tapestry
> Attachments:
> 0001-TAP5-2029-Test-case-involving-generic-interface.patch
>
>
> The commit after and persistence context annotations are required on the
> service interface definition thereby exposing internal implementation details
> (see below example from docs). Details of implementation should be hidden at
> the interface level, both these annotations break the rule.
> Perhaps this code could appear in the Impl classes, or be provided in
> configuration somehow?
> public interface UserDAO {
> @CommitAfter
> @PersistenceContext(unitName = "DemoUnit")
> void add(User user);
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)