dev@jsr311.java.net

Re: JSR311: Providers.getContextResolver makes no sense

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Wed, 27 Aug 2008 15:52:47 -0400

Yes. Note that we already made this change in the trunk and 0.11
snapshot:

https://jsr311.dev.java.net/nonav/releases/0.11/javax/ws/rs/ext/Providers.html
#getContextResolver(java.lang.Class,%20javax.ws.rs.core.MediaType)

Thanks,
Marc.

On Aug 27, 2008, at 3:38 PM, Bill Burke wrote:

> Specifically the objectType parameter. The objectType parameter
> assumes it will be used to call
> ContextResolver.getContext(objecType). The resolver that doesn't
> return null is returned.
>
> This is really bad because the ContextResolver might be used as a
> factory and may create multiple objects which could have undesirable
> effects on applications.
>
> I suggest removing the objectType parameter from
> Providers.getContextResolver and having this method return a proxy
> that does the action.
>
>
>
> Bill
>
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_jsr311.dev.java.net
> For additional commands, e-mail: dev-help_at_jsr311.dev.java.net
>

---
Marc Hadley <marc.hadley at sun.com>
CTO Office, Sun Microsystems.