summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Forsyth <jf2512@att.com>2017-09-28 16:07:59 +0000
committerGerrit Code Review <gerrit@onap.org>2017-09-28 16:07:59 +0000
commit44147a30af456e7e932852d6efb8fff55d857481 (patch)
tree67cdb1d63fbb7bc8e10d74cbcbf5b4696f16ad51
parent69e5338d7d4d88de2b6d3a91eb1a0db41683d45e (diff)
parent702322555d11626d14ef075133202ca67d09c7f0 (diff)
Merge "Removed useless assignment to variables"
-rw-r--r--src/main/java/org/openecomp/datarouter/util/NodeUtils.java2
-rw-r--r--src/main/java/org/openecomp/datarouter/util/OxmModelLoader.java6
-rw-r--r--src/main/java/org/openecomp/datarouter/util/RouterServiceUtil.java6
-rw-r--r--src/main/java/org/openecomp/datarouter/util/SearchServiceAgent.java2
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;