hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HTTPCLIENT-1731) java.lang.NullPointerException
Date Thu, 17 Mar 2016 09:48:33 GMT

    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1731?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15199229#comment-15199229
] 

Oleg Kalnichevski commented on HTTPCLIENT-1731:
-----------------------------------------------

bq. java.lang.NullPointerException at org.apache.http.client.protocol.ResponseProcessCookies.formatCooke(ResponseProcessCookies.java:140)
at org.apache.http.client.protocol.ResponseProcessCookies.processCookies(ResponseProcessCookies.java:117)
at 

As far as I can tell the stack trace does not match the source of 4.4.1
http://hc.apache.org/httpcomponents-client-4.4.x/httpclient/xref/org/apache/http/client/protocol/ResponseProcessCookies.html#117

It also makes no sense that NPE gets thrown at line 140 but for some reason not at 138 
http://hc.apache.org/httpcomponents-client-4.4.x/httpclient/xref/org/apache/http/client/protocol/ResponseProcessCookies.html#140
{code:java}
    private static String formatCooke(final Cookie cookie) {
        final StringBuilder buf = new StringBuilder();
        buf.append(cookie.getName());
        buf.append("=\"");
        String v = cookie.getValue();
{code}

Oleg

> java.lang.NullPointerException
> ------------------------------
>
>                 Key: HTTPCLIENT-1731
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1731
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 4.4.1
>         Environment: Rehl5 
>            Reporter: Guoshi Li
>
> java.lang.NullPointerException at org.apache.http.client.protocol.ResponseProcessCookies.formatCooke(ResponseProcessCookies.java:140)
at org.apache.http.client.protocol.ResponseProcessCookies.processCookies(ResponseProcessCookies.java:117)
at org.apache.http.client.protocol.ResponseProcessCookies.process(ResponseProcessCookies.java:91)
at org.apache.http.protocol.ImmutableHttpProcessor.process(ImmutableHttpProcessor.java:139)
at org.apache.http.protocol.HttpRequestExecutor.postProcess(HttpRequestExecutor.java:308)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:495)
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863) at
org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57)
at org.apache.http.client.HttpClient$execute.call(Unknown Source) at com.jayway.restassured.internal.RequestSpecificationImpl$RestAssuredHttpBuilder.doRequest(RequestSpecificationImpl.groovy:1350)
at com.jayway.restassured.internal.http.HTTPBuilder.doRequest(HTTPBuilder.java:489) at com.jayway.restassured.internal.http.HTTPBuilder.request(HTTPBuilder.java:438)
at com.jayway.restassured.internal.http.HTTPBuilder$request.call(Unknown Source) at com.jayway.restassured.internal.RequestSpecificationImpl.sendHttpRequest(RequestSpecificationImpl.groovy:926)
at com.jayway.restassured.internal.RequestSpecificationImpl.this$2$sendHttpRequest(RequestSpecificationImpl.groovy)
at com.jayway.restassured.internal.RequestSpecificationImpl$this$2$sendHttpRequest.callCurrent(Unknown
Source) at com.jayway.restassured.internal.RequestSpecificationImpl.sendRequest(RequestSpecificationImpl.groovy:793)
at com.jayway.restassured.internal.RequestSpecificationImpl.this$2$sendRequest(RequestSpecificationImpl.groovy)
at com.jayway.restassured.internal.RequestSpecificationImpl$this$2$sendRequest.call(Unknown
Source) at com.jayway.restassured.internal.filter.RootFilter.filter(RootFilter.groovy:28)
at com.jayway.restassured.filter.Filter$filter.call(Unknown Source) at com.jayway.restassured.internal.filter.FilterContextImpl.next(FilterContextImpl.groovy:47)
at com.jayway.restassured.filter.FilterContext$next.call(Unknown Source) at com.jayway.restassured.internal.RequestSpecificationImpl.invokeFilterChain(RequestSpecificationImpl.groovy:731)
at com.jayway.restassured.internal.RequestSpecificationImpl$invokeFilterChain.callCurrent(Unknown
Source) at com.jayway.restassured.internal.RequestSpecificationImpl.applyPathParamsAndSendRequest(RequestSpecificationImpl.groovy:1115)
at com.jayway.restassured.internal.RequestSpecificationImpl.this$2$applyPathParamsAndSendRequest(RequestSpecificationImpl.groovy)
at com.jayway.restassured.internal.RequestSpecificationImpl$this$2$applyPathParamsAndSendRequest.callCurrent(Unknown
Source) at com.jayway.restassured.internal.RequestSpecificationImpl.get(RequestSpecificationImpl.groovy:130)
at com.jayway.restassured.specification.RequestSender$get.call(Unknown Source) at com.jayway.restassured.internal.ResponseSpecificationImpl.get(ResponseSpecificationImpl.groovy:218)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message