X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fonap%2Faai%2Fdatarouter%2Fentity%2FAaiEventEntity.java;fp=src%2Fmain%2Fjava%2Forg%2Fonap%2Faai%2Fdatarouter%2Fentity%2FAaiEventEntity.java;h=0391ae3a722b1b25dc0ee58a94e5bfa959d6abca;hb=0a6e3351cce03350b59d9af91cbe38f3233ca0ff;hp=c32cd6fade4037f18dee0016a8b017f89ea48798;hpb=c3da674039c279812a11b187059003216413b1cc;p=aai%2Fdata-router.git diff --git a/src/main/java/org/onap/aai/datarouter/entity/AaiEventEntity.java b/src/main/java/org/onap/aai/datarouter/entity/AaiEventEntity.java index c32cd6f..0391ae3 100644 --- a/src/main/java/org/onap/aai/datarouter/entity/AaiEventEntity.java +++ b/src/main/java/org/onap/aai/datarouter/entity/AaiEventEntity.java @@ -72,9 +72,9 @@ public class AaiEventEntity implements DocumentStoreDataEntity, Serializable { protected String entityType; protected String entityPrimaryKeyName; protected String entityPrimaryKeyValue; - protected ArrayList searchTagCollection = new ArrayList(); - protected ArrayList searchTagIdCollection = new ArrayList(); - protected ArrayList crossEntityReferenceCollection = new ArrayList(); + protected ArrayList searchTagCollection = new ArrayList<>(); + protected ArrayList searchTagIdCollection = new ArrayList<>(); + protected ArrayList crossEntityReferenceCollection = new ArrayList<>(); protected String lastmodTimestamp; protected String link; @@ -95,7 +95,7 @@ public class AaiEventEntity implements DocumentStoreDataEntity, Serializable { private static String convertBytesToHexString(byte[] bytesToConvert) { - StringBuffer hexString = new StringBuffer(); + StringBuilder hexString = new StringBuilder(); for (int i = 0; i < bytesToConvert.length; i++) { hexString.append(Integer.toHexString(0xFF & bytesToConvert[i])); } @@ -104,13 +104,12 @@ public class AaiEventEntity implements DocumentStoreDataEntity, Serializable { private static String concatArray(List list, char delimiter) { - if (list == null || list.size() == 0) { + if (list == null || list.isEmpty()) { return ""; } StringBuilder result = new StringBuilder(64); - int listSize = list.size(); boolean firstValue = true; for (String item : list) {