You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wink.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2009/07/09 00:21:15 UTC

[jira] Commented: (WINK-53) MessageBodyReader.isReadable methods should do straight ==

    [ https://issues.apache.org/jira/browse/WINK-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12728934#action_12728934 ] 

Hudson commented on WINK-53:
----------------------------

Integrated in Wink-Trunk-JDK15 #13 (See [http://hudson.zones.apache.org/hudson/job/Wink-Trunk-JDK15/13/])
    Use == for isReadable instead of isAssignable

See []


> MessageBodyReader.isReadable methods should do straight ==
> ----------------------------------------------------------
>
>                 Key: WINK-53
>                 URL: https://issues.apache.org/jira/browse/WINK-53
>             Project: Wink
>          Issue Type: Bug
>          Components: Common
>    Affects Versions: 0.1
>            Reporter: Bryant Luk
>            Assignee: Bryant Luk
>            Priority: Minor
>             Fix For: 0.1
>
>         Attachments: WINK-53.patch
>
>
> In some cases the built in MessageBodyReaders providers's isReadable method does an isAssignableFrom.  This should just be a straight == instead.
> For instance in InputStreamProvider:
>      public boolean isReadable(Class<?> type, Type genericType, Annotation[] ann
>          MediaType mediaType) {
> -        return type != null && InputStream.class.isAssignableFrom(type);
> +        return type != null && InputStream.class == type;
>      }
> If the method parameter were:
> @GET
> public void getMethod(FileInputStream fis) {
> }
> we get a 500 back (because I think the injection throws) instead of a 415.  I can fix this up.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.