summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/HttpMethod.java11
-rw-r--r--restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RetryPolicy.java14
2 files changed, 13 insertions, 12 deletions
diff --git a/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/HttpMethod.java b/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/HttpMethod.java
index 40dfa371..b2f618a1 100644
--- a/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/HttpMethod.java
+++ b/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/HttpMethod.java
@@ -4,6 +4,7 @@
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights
* reserved.
+ * Modifications Copyright © 2018 IBM.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,15 +28,15 @@ public enum HttpMethod {
public static HttpMethod fromString(String s) {
if (s == null)
return null;
- if (s.equalsIgnoreCase("get"))
+ if (("get").equalsIgnoreCase(s))
return GET;
- if (s.equalsIgnoreCase("post"))
+ if (("post").equalsIgnoreCase(s))
return POST;
- if (s.equalsIgnoreCase("put"))
+ if (("put").equalsIgnoreCase(s))
return PUT;
- if (s.equalsIgnoreCase("delete"))
+ if (("delete").equalsIgnoreCase(s))
return DELETE;
- if (s.equalsIgnoreCase("patch"))
+ if (("patch").equalsIgnoreCase(s))
return PATCH;
throw new IllegalArgumentException("Invalid value for HTTP Method: " + s);
}
diff --git a/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RetryPolicy.java b/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RetryPolicy.java
index 5cee0779..54c86fef 100644
--- a/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RetryPolicy.java
+++ b/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RetryPolicy.java
@@ -4,6 +4,7 @@
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights
* reserved.
+ * Modifications Copyright © 2018 IBM
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,7 +24,12 @@ package org.onap.ccsdk.sli.plugins.restapicall;
public class RetryPolicy {
private String[] hostnames;
- private Integer maximumRetries;
+ private Integer maximumRetries;
+
+ public RetryPolicy(String[] hostnames, Integer maximumRetries){
+ this.hostnames = hostnames;
+ this.maximumRetries = maximumRetries;
+ }
public Integer getMaximumRetries() {
return maximumRetries;
@@ -51,10 +57,4 @@ public class RetryPolicy {
return hostnames[position];
}
- public RetryPolicy(String[] hostnames, Integer maximumRetries){
- this.hostnames = hostnames;
- this.maximumRetries = maximumRetries;
- }
-
-
}