[
https://issues.apache.org/jira/browse/WINK-84?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12731500#action_12731500
]
Nick Gallardo commented on WINK-84:
-----------------------------------
Someone came to me with that pattern the other day. I don't like it though,
seems like janky way to reduce code.
This...
{code}
@Provider
@Produces("text/foo")
@Path("/foo")
public class MyHybrib implements MessageBodyReader, MessageBodyWriter {
@GET
@Produces("text/foo")
public String get() {}
public boolean isReadable()
public boolean isWriteable()
}
just doesn't seem right. In the case where it's a singleton, I would guess the
lifecycle is the same and you're using the same object instance for both
(business logic and provider gorp).
> Classes returned from getClasses/getSingletons can be a provider and a
> resource
> -------------------------------------------------------------------------------
>
> Key: WINK-84
> URL: https://issues.apache.org/jira/browse/WINK-84
> Project: Wink
> Issue Type: Bug
> Components: Common
> Affects Versions: 0.1
> Reporter: Bryant Luk
> Priority: Minor
>
> I don't think there was anything stopping classes returned from
> Application.getClasses() / getSingletons() to be both a resource and a
> provider besides coding style.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.