[JIRA] Closed: (JOWS-32) Inconsitency in getStatusCode result in HttpServletRequestAdapter

Brent Putman (JIRA) noreply at shibboleth.net
Sat Oct 22 20:28:25 BST 2011


     [ https://issues.shibboleth.net/jira/browse/JOWS-32?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brent Putman closed JOWS-32.
----------------------------

       Resolution: Fixed
    Fix Version/s: 1.4.3

Fixed in r420.

> Inconsitency in getStatusCode result in HttpServletRequestAdapter
> -----------------------------------------------------------------
>
>                 Key: JOWS-32
>                 URL: https://issues.shibboleth.net/jira/browse/JOWS-32
>             Project: OpenWS - Java
>          Issue Type: Bug
>    Affects Versions: 1.4.2
>         Environment: Java
>            Reporter: awulms at idp.protectnetwork.org
>            Assignee: Brent Putman
>            Priority: Minor
>             Fix For: 1.4.3
>
>
> The javadoc comment of method getStatusCode() of class org.opensaml.ws.transport.http.HttpServletRequestAdapter says that the method will return a -1 because the method is not supported. However, the method returns a (+)1;
> >
> >     /**
> >
> >      * {@inheritDoc}
> >
> >      *
> >
> >      * This method is not supported for this transport implementation. 
> > It always returns -1;
> >
> >      */
> >
> >     public int getStatusCode() {
> >
> >         return 1;
> >
> >     }
> This confusing and may lead to bugs if people invoking this method interprete the result based on the javadoc comment.
> The method is actually defined in the interface org.opensaml.ws.transport.http.HTTPTransport (HttpServletRequestAdapter implements this interface). The interface does not give any details at all about expected values for this method. It would make sense to document it in the javadoc.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the commits mailing list