Add a private constructor in AAIUtils.java 01/65701/1
authorasgar <sammoham@in.ibm.com>
Tue, 11 Sep 2018 08:38:43 +0000 (14:08 +0530)
committerasgar <sammoham@in.ibm.com>
Tue, 11 Sep 2018 08:38:49 +0000 (14:08 +0530)
Change-Id: I7a2beeede4cb8303b7f9801532a651895cbce389
Issue-ID: AAI-1566
Signed-off-by: Mohamed Asgar Samiulla <sammoham@in.ibm.com>
aai-core/src/main/java/org/onap/aai/util/AAIUtils.java

index ce53d86..ba2cf9e 100644 (file)
@@ -4,6 +4,8 @@
  * ================================================================================
  * Copyright © 2017-2018 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.
  * You may obtain a copy of the License at
@@ -26,27 +28,34 @@ import java.util.Date;
 import java.util.TimeZone;
 
 public class AAIUtils {
+    
+    /**
+     * Instantiates AAIUtils.
+     */
+    private AAIUtils() {
+        // prevent instantiation
+    }
 
-       /**
-        * Null check.
-        *
-        * @param <T> the generic type
-        * @param iterable the iterable
-        * @return the iterable
-        */
-       public static <T> Iterable<T> nullCheck(Iterable<T> iterable) {
-               return iterable == null ? Collections.<T>emptyList() : iterable;
-       }
+    /**
+     * Null check.
+     *
+     * @param <T> the generic type
+     * @param iterable the iterable
+     * @return the iterable
+     */
+    public static <T> Iterable<T> nullCheck(Iterable<T> iterable) {
+        return iterable == null ? Collections.<T>emptyList() : iterable;
+    }
 
-       /**
-        * Gen date.
-        *
-        * @return the string
-        */
-       public static String genDate() {
-               Date date = new Date();
-               DateFormat formatter = new SimpleDateFormat("YYMMdd-HH:mm:ss:SSS");
-               formatter.setTimeZone(TimeZone.getTimeZone("GMT"));
-               return formatter.format(date);
-       }       
+    /**
+     * Gen date.
+     *
+     * @return the string
+     */
+    public static String genDate() {
+        Date date = new Date();
+        DateFormat formatter = new SimpleDateFormat("YYMMdd-HH:mm:ss:SSS");
+        formatter.setTimeZone(TimeZone.getTimeZone("GMT"));
+        return formatter.format(date);
+    }    
 }