summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Forsyth <jf2512@att.com>2018-09-11 12:12:19 +0000
committerGerrit Code Review <gerrit@onap.org>2018-09-11 12:12:19 +0000
commitb4de081fa7d01d8ee31faa878dc09d7be6107eda (patch)
tree79f0505e342060385ba0e44dcc8f4805fe850257
parent0cc9e93e0407abf7c0391784eab617179eeaf767 (diff)
parent3aa58f7244c6123972cd98851a3e9dcd6652d75a (diff)
Merge "Add a private constructor in AAIUtils.java"
-rw-r--r--aai-core/src/main/java/org/onap/aai/util/AAIUtils.java51
1 files changed, 30 insertions, 21 deletions
diff --git a/aai-core/src/main/java/org/onap/aai/util/AAIUtils.java b/aai-core/src/main/java/org/onap/aai/util/AAIUtils.java
index ce53d86e..ba2cf9e2 100644
--- a/aai-core/src/main/java/org/onap/aai/util/AAIUtils.java
+++ b/aai-core/src/main/java/org/onap/aai/util/AAIUtils.java
@@ -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);
+ }
}