hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1719228 - /httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientWithRequestFuture.java
Date Thu, 10 Dec 2015 22:51:04 GMT
Author: ggregory
Date: Thu Dec 10 22:51:04 2015
New Revision: 1719228

URL: http://svn.apache.org/viewvc?rev=1719228&view=rev
Log:
Reduce use of magic number 200 (Use HttpStatus.SC_OK)

Modified:
    httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientWithRequestFuture.java

Modified: httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientWithRequestFuture.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientWithRequestFuture.java?rev=1719228&r1=1719227&r2=1719228&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientWithRequestFuture.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientWithRequestFuture.java
Thu Dec 10 22:51:04 2015
@@ -58,7 +58,7 @@ public class ClientWithRequestFuture {
                 @Override
                 public Boolean handleResponse(HttpResponse response) throws ClientProtocolException,
IOException {
                     // simply return true if the status was OK
-                    return response.getStatusLine().getStatusCode() == 200;
+                    return response.getStatusLine().getStatusCode() == HttpStatus.SC_OK;
                 }
             };
 



Mime
View raw message