[jboss-jira] [JBoss JIRA] Commented: (JBREM-1046) HTTPClientInvoker throws NullPointerException when HttpURLConnection.getInputStream() returns null

Ron Sigal (JIRA) jira-events at lists.jboss.org
Mon Oct 27 22:08:20 EDT 2008


    [ https://jira.jboss.org/jira/browse/JBREM-1046?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12435652#action_12435652 ] 

Ron Sigal commented on JBREM-1046:
----------------------------------

The default behavior has been restored; that is, HTTPClientInvoker will call UnMarshaller.read() even if HttpURLConnection.getInputStream() (or HttpURLConnection.getErrorStream()) is null.

A new variable, HTTPClientInvoker.UNMARSHAL_NULL_STREAM (actual value "unmarshalNullStream"), has been added to control this behavior. If it is set to "true", which is the default value, the default behavior occurs. If it is set to "false", the call to UnMarshaller.read() is skipped.

Unit test: org.jboss.test.remoting.transport.http.NullInputStreamTestCase.

Waiting for hudson results.

> HTTPClientInvoker throws NullPointerException when HttpURLConnection.getInputStream() returns null
> --------------------------------------------------------------------------------------------------
>
>                 Key: JBREM-1046
>                 URL: https://jira.jboss.org/jira/browse/JBREM-1046
>             Project: JBoss Remoting
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 2.5.0.GA (Flounder)
>            Reporter: Ron Sigal
>            Assignee: Ron Sigal
>             Fix For: 2.5.0.SP1 (Flounder)
>
>
> When an HTTP server returns an error code and no content, it is possible for java.net.HttpUrlConnection.getInputStream() to retun null, which causes a NullPointerException in org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection().

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list