Replace type spec with diamond op 32/93232/1
authorsindhu3672 <arcot.sindhuri@huawei.com>
Fri, 9 Aug 2019 16:17:34 +0000 (21:47 +0530)
committersindhu3672 <arcot.sindhuri@huawei.com>
Fri, 9 Aug 2019 16:17:34 +0000 (21:47 +0530)
Replace type spec with diamond operator cloudify-client classes

Issue-ID: SO-2187

Signed-off-by: sindhu3672 <arcot.sindhuri@huawei.com>
Change-Id: I074c6d28b387a425841f1e35964c336834aff5b4

cloudify-client/src/main/java/org/onap/so/cloudify/base/client/CloudifyClient.java
cloudify-client/src/main/java/org/onap/so/cloudify/base/client/CloudifyRequest.java

index 3bd646f..d15fbf9 100644 (file)
@@ -135,7 +135,7 @@ public class CloudifyClient {
      * @return An object of Class <R>
      */
     public <R> CloudifyRequest<R> get(String path, Class<R> returnType) {
-        return new CloudifyRequest<R>(this, HttpMethod.GET, path, null, returnType);
+        return new CloudifyRequest<>(this, HttpMethod.GET, path, null, returnType);
     }
 
 }
index df63bd1..006768f 100644 (file)
@@ -37,7 +37,7 @@ public class CloudifyRequest<R> {
 
     private StringBuilder path = new StringBuilder();
 
-    private Map<String, List<Object>> headers = new HashMap<String, List<Object>>();
+    private Map<String, List<Object>> headers = new HashMap<>();
 
     private Entity<?> entity;
 
@@ -100,7 +100,7 @@ public class CloudifyRequest<R> {
     }
 
     public <T> Entity<T> entity(T entity, String contentType) {
-        return new Entity<T>(entity, contentType);
+        return new Entity<>(entity, contentType);
     }
 
     public Entity<?> entity() {
@@ -160,7 +160,7 @@ public class CloudifyRequest<R> {
                 + headers + ", entity=" + entity + ", returnType=" + returnType + "]";
     }
 
-    private Map<String, List<Object>> queryParams = new LinkedHashMap<String, List<Object>>();
+    private Map<String, List<Object>> queryParams = new LinkedHashMap<>();
 
     public Map<String, List<Object>> queryParams() {
         return queryParams;
@@ -171,7 +171,7 @@ public class CloudifyRequest<R> {
             List<Object> values = queryParams.get(key);
             values.add(value);
         } else {
-            List<Object> values = new ArrayList<Object>();
+            List<Object> values = new ArrayList<>();
             values.add(value);
             queryParams.put(key, values);
         }