diff options
Diffstat (limited to 'src/main/java')
4 files changed, 8 insertions, 8 deletions
diff --git a/src/main/java/org/openecomp/datarouter/util/NodeUtils.java b/src/main/java/org/openecomp/datarouter/util/NodeUtils.java index d98b2e6..4362d11 100644 --- a/src/main/java/org/openecomp/datarouter/util/NodeUtils.java +++ b/src/main/java/org/openecomp/datarouter/util/NodeUtils.java @@ -159,7 +159,7 @@ public class NodeUtils { */ public static String convertObjectToJson(Object object, boolean pretty) throws JsonProcessingException { - ObjectWriter ow = null; + ObjectWriter ow; ObjectMapper mapper = new ObjectMapper(); mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false); diff --git a/src/main/java/org/openecomp/datarouter/util/OxmModelLoader.java b/src/main/java/org/openecomp/datarouter/util/OxmModelLoader.java index 799b61c..a696740 100644 --- a/src/main/java/org/openecomp/datarouter/util/OxmModelLoader.java +++ b/src/main/java/org/openecomp/datarouter/util/OxmModelLoader.java @@ -50,8 +50,8 @@ import org.springframework.core.io.support.ResourcePatternResolver; public class OxmModelLoader { - private static Map<String, DynamicJAXBContext> versionContextMap = new ConcurrentHashMap<String, DynamicJAXBContext>(); - private static List<ExternalOxmModelProcessor> oxmModelProcessorRegistry = new ArrayList<ExternalOxmModelProcessor>(); + private static Map<String, DynamicJAXBContext> versionContextMap = new ConcurrentHashMap<>(); + private static List<ExternalOxmModelProcessor> oxmModelProcessorRegistry = new ArrayList<>(); final static Pattern p = Pattern.compile("aai_oxm_(.*).xml"); @@ -95,7 +95,7 @@ public class OxmModelLoader { private synchronized static void loadModel(String version,String resourceName,InputStream inputStream) throws JAXBException, FileNotFoundException { - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); properties.put(JAXBContextProperties.OXM_METADATA_SOURCE, inputStream); final DynamicJAXBContext jaxbContext = DynamicJAXBContextFactory .createContextFromOXM(Thread.currentThread().getContextClassLoader(), properties); diff --git a/src/main/java/org/openecomp/datarouter/util/RouterServiceUtil.java b/src/main/java/org/openecomp/datarouter/util/RouterServiceUtil.java index 1af7564..77366c5 100644 --- a/src/main/java/org/openecomp/datarouter/util/RouterServiceUtil.java +++ b/src/main/java/org/openecomp/datarouter/util/RouterServiceUtil.java @@ -62,7 +62,7 @@ public class RouterServiceUtil { public static Map<String, String> parseJsonPayloadIntoMap(String jsonPayload) { JSONObject jsonObject = new JSONObject(jsonPayload); - Map<String, String> map = new HashMap<String, String>(); + Map<String, String> map = new HashMap<>(); Iterator iter = jsonObject.keys(); while (iter.hasNext()) { String key = (String) iter.next(); @@ -91,7 +91,7 @@ public class RouterServiceUtil { public static String concatArray(List<String> list, String delimiter) { - if (list == null || list.size() == 0) { + if (list == null || !list.isEmpty()) { return ""; } @@ -223,7 +223,7 @@ public class RouterServiceUtil { if (node.isObject()) { - JsonNode valueNode = null; + JsonNode valueNode; for (String attrToExtract : attributesToExtract) { diff --git a/src/main/java/org/openecomp/datarouter/util/SearchServiceAgent.java b/src/main/java/org/openecomp/datarouter/util/SearchServiceAgent.java index 0fa50c2..de31597 100644 --- a/src/main/java/org/openecomp/datarouter/util/SearchServiceAgent.java +++ b/src/main/java/org/openecomp/datarouter/util/SearchServiceAgent.java @@ -54,7 +54,7 @@ public class SearchServiceAgent { private Logger logger;
private RestClient searchClient = null;
- private Map<String, String> indexSchemaMapping = new HashMap<String, String>();
+ private Map<String, String> indexSchemaMapping = new HashMap<>();
private String searchUrl = null;
private String documentEndpoint = null;
|