Sonar Fix: RestapiCallNode.java
[ccsdk/sli/plugins.git] / restapi-call-node / provider / src / main / java / org / onap / ccsdk / sli / plugins / restapicall / RetryPolicy.java
index 3059a44..54c86fe 100644 (file)
@@ -2,8 +2,9 @@
  * ============LICENSE_START=======================================================
  * openECOMP : SDN-C
  * ================================================================================
- * Copyright (C) 2017 ONAP Intellectual Property. All rights
- *                                             reserved.
+ * 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;
@@ -40,7 +46,8 @@ public class RetryPolicy {
         }
 
         if(position == null){
-            throw new RetryException("No match found for the provided uri[" + uri + "] so the next host name could not be retreived");
+            throw new RetryException("No match found for the provided uri[" + uri + "] " +
+                    "so the next host name could not be retreived");
         }
         position++;
 
@@ -50,10 +57,4 @@ public class RetryPolicy {
         return hostnames[position];
     }
 
-    public RetryPolicy(String[] hostnames, Integer maximumRetries){
-        this.hostnames = hostnames;
-        this.maximumRetries = maximumRetries;
-    }
-    
-
 }