X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fonap%2Faai%2Fdatarouter%2Fentity%2FTopographicalEntity.java;h=1f8157338c2d735bbb138212a3cd35e8d2e7c1b2;hb=2a5ff133471c5a69b0dfd760d2743f48112da9a0;hp=fa25a56c56b50809072afc1c916e23328ad05f58;hpb=da309841ad25ab47537a6d2de00cd98bd113392c;p=aai%2Fdata-router.git diff --git a/src/main/java/org/onap/aai/datarouter/entity/TopographicalEntity.java b/src/main/java/org/onap/aai/datarouter/entity/TopographicalEntity.java index fa25a56..1f81573 100644 --- a/src/main/java/org/onap/aai/datarouter/entity/TopographicalEntity.java +++ b/src/main/java/org/onap/aai/datarouter/entity/TopographicalEntity.java @@ -46,7 +46,7 @@ public class TopographicalEntity implements DocumentStoreDataEntity, Serializabl protected String id; 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])); } @@ -55,13 +55,12 @@ public class TopographicalEntity implements DocumentStoreDataEntity, Serializabl 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) { @@ -103,6 +102,7 @@ public class TopographicalEntity implements DocumentStoreDataEntity, Serializabl * * @see org.onap.aai.datarouter.entity.TopographicalEntity#getAsJson() */ + @Override public String getAsJson() throws IOException { JsonObject obj =