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

awulms@idp.protectnetwork.org (JIRA) noreply at shibboleth.net
Fri Oct 14 15:18:25 BST 2011


Inconsitency in getStatusCode result in HttpServletRequestAdapter
-----------------------------------------------------------------

                 Key: JOWS-32
                 URL: https://issues.shibboleth.net/jira/browse/JOWS-32
             Project: OpenWS - Java
          Issue Type: Bug
          Components: WS-*
    Affects Versions: 1.4.2
         Environment: Java
            Reporter: awulms at idp.protectnetwork.org
            Assignee: Chad La Joie
            Priority: Minor


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