X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fonap%2Faai%2Fdatarouter%2Fentity%2FAaiEventEntity.java;h=70fd6e4ef97ad1510b54d6a6b32881fb795315d2;hb=d46b0b9c3ce9ad5eca684ebeccb89f04d3cbcf6c;hp=c32cd6fade4037f18dee0016a8b017f89ea48798;hpb=da309841ad25ab47537a6d2de00cd98bd113392c;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..70fd6e4 100644 --- a/src/main/java/org/onap/aai/datarouter/entity/AaiEventEntity.java +++ b/src/main/java/org/onap/aai/datarouter/entity/AaiEventEntity.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * org.onap.aai * ================================================================================ - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. - * Copyright © 2017 Amdocs + * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. + * Copyright © 2017-2018 Amdocs * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,34 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * ============LICENSE_END========================================================= - * - * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ -/* -* ============LICENSE_START======================================================= -* DataRouter -* ================================================================================ -* Copyright © 2017 AT&T Intellectual Property. -* Copyright © 2017 Amdocs -* All rights reserved. -* ================================================================================ -* 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 -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* ============LICENSE_END========================================================= -* -* ECOMP and OpenECOMP are trademarks -* and service marks of AT&T Intellectual Property. -*/ - package org.onap.aai.datarouter.entity; import java.io.IOException; @@ -59,7 +32,7 @@ import java.util.List; import javax.json.Json; import javax.json.JsonObject; -import org.openecomp.datarouter.util.NodeUtils; +import org.onap.aai.datarouter.util.NodeUtils; /** * Note: AAIEventEntity is a port forward of IndexDocument Has been renamed here to move forward @@ -72,9 +45,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 +68,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 +77,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) {