Skip to content

Commit 526de0e

Browse files
committed
Removed null param to headers
1 parent 73fce55 commit 526de0e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/main/java/org/fogbowcloud/app/ps/ProvisioningRequestHelper.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import com.google.gson.JsonObject;
55
import com.google.gson.reflect.TypeToken;
66
import java.lang.reflect.Type;
7+
import java.util.LinkedList;
78
import java.util.Map;
89
import java.util.Properties;
910
import org.apache.http.client.methods.HttpGet;
@@ -33,14 +34,14 @@ public void createPool(String poolName) throws Exception {
3334
poolBody.addProperty(Constants.POOL_NAME_KEY, poolName);
3435
StringEntity body = new StringEntity(poolBody.toString());
3536

36-
String jsonResponse = HttpWrapper.doRequest(HttpPost.METHOD_NAME, url, null, body);
37+
String jsonResponse = HttpWrapper.doRequest(HttpPost.METHOD_NAME, url, new LinkedList<>(), body);
3738
JsonObject response = this.jsonUtil.fromJson(jsonResponse, JsonObject.class);
3839
logger.info("Response message: " + response.get(Constants.MSG_KEY));
3940
}
4041

4142
public Pool getPool(String poolName) throws Exception {
4243
String url = String.format(serviceBaseUrl + Endpoint.POOL, poolName);
43-
String jsonResponse = HttpWrapper.doRequest(HttpGet.METHOD_NAME, url, null);
44+
String jsonResponse = HttpWrapper.doRequest(HttpGet.METHOD_NAME, url, new LinkedList<>());
4445
Pool pool = this.jsonUtil.fromJson(jsonResponse, Pool.class);
4546
return pool;
4647
}
@@ -53,7 +54,7 @@ public void addNode(String poolName, String nodeAddress) throws Exception {
5354
nodeBody.addProperty(Constants.ADDRESS_KEY, nodeAddress);
5455
StringEntity body = new StringEntity(nodeBody.toString());
5556

56-
String jsonResponse = HttpWrapper.doRequest(HttpPost.METHOD_NAME, url, null, body);
57+
String jsonResponse = HttpWrapper.doRequest(HttpPost.METHOD_NAME, url, new LinkedList<>(), body);
5758
JsonObject response = this.jsonUtil.fromJson(jsonResponse, JsonObject.class);
5859
logger.info("Response message: " + response.get(Constants.MSG_KEY));
5960
}
@@ -62,7 +63,7 @@ public boolean containsPool(String poolName) throws Exception {
6263
boolean answer = false;
6364
String url = serviceBaseUrl + Endpoint.POOLS;
6465
Type type = new TypeToken<Map<String, Pool>>() {}.getType();
65-
String jsonResponse = HttpWrapper.doRequest(HttpGet.METHOD_NAME, url, null);
66+
String jsonResponse = HttpWrapper.doRequest(HttpGet.METHOD_NAME, url, new LinkedList<>());
6667
Map<String, Pool> pools = this.jsonUtil.fromJson(jsonResponse, type);
6768
if (pools.containsKey(poolName)) {
6869
answer = true;

0 commit comments

Comments
 (0)