getStatusCode() method in HttpServletRequestAdapter

WULMS Alexander Alexander.WULMS at swift.com
Mon Oct 10 16:31:52 BST 2011


Hi,

I'm busy with a (partial) code review of shibboleth IdP and supporting java classes. I noticed a small inconsistency in HttpServletRequesAdapter (from java-openws ): The comment of method getStatusCode() 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;
    }

The inconsistency is there in the most recent version (1.4.2) but also in the oldest revision I found in the svn repository. I did not check the intermediate versions. I assume it is not an issue for shibboleth idp, as it seems the method does not get invoked by shibboleth. But it may lead to subtle bugs if the method eventually gets invoked by some apps relying on java-openws library, depending on whether the person using it will rely on the comments or on the actual implementation.

Thanks and brs,
Alex


Alex Wulms
Lead Developer, Swift.com development
Tel: + 32 2 655 3931
S.W.I.F.T. SCRL

This e-mail and any attachments thereto may contain information which is confidential and/or proprietary and intended for the sole use of the recipient(s) named above. If you have received this e-mail in error, please immediately notify the sender and delete the mail.  Thank you for your co-operation.  SWIFT reserves the right to retain e-mail messages on its systems and, under circumstances permitted by applicable law, to monitor and intercept e-mail messages to and from its systems.

Please visit http://www.swift.com<http://www.swift.com/> for more information about SWIFT.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://shibboleth.net/pipermail/users/attachments/20111010/6359abc9/attachment-0001.html 


More information about the users mailing list