Permalink
Browse files

hardcoded constants for http_ok replaced

  • Loading branch information...
1 parent 3dc4fe8 commit fc1f0668980ead7748ee6ac27112aa26d9dd6497 @akkumar akkumar committed Dec 31, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/java/voldemort/store/readonly/swapper/HttpStoreSwapper.java
@@ -2,6 +2,7 @@
import java.io.File;
import java.io.InputStream;
+import java.net.HttpURLConnection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -86,7 +87,7 @@ public String call() throws Exception {
InputStream is = httpResponse.getEntity().getContent();
String response = VoldemortIOUtils.toString(is, 30000);
- if(responseCode != 200)
+ if(responseCode != HttpURLConnection.HTTP_OK)
throw new VoldemortException("Fetch request on node "
+ node.getId()
+ " ("
@@ -186,7 +187,7 @@ public void invokeSwap(final String storeName, final List<String> fetchFiles) {
String previousDir = VoldemortIOUtils.toString(httpResponse.getEntity()
.getContent(), 30000);
- if(responseCode != 200)
+ if(responseCode != HttpURLConnection.HTTP_OK)
throw new VoldemortException("Swap request on node " + node.getId() + " ("
+ url + ") failed: "
+ httpResponse.getStatusLine().getReasonPhrase());

0 comments on commit fc1f066

Please sign in to comment.