summaryrefslogtreecommitdiffstats
path: root/common/onap-common-configuration-management/onap-configuration-management-core/src
diff options
context:
space:
mode:
Diffstat (limited to 'common/onap-common-configuration-management/onap-configuration-management-core/src')
-rw-r--r--common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/ConfigurationUtils.java11
-rw-r--r--common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/AggregateConfiguration.java3
-rw-r--r--common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/CliConfigurationImpl.java38
-rw-r--r--common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/ConfigurationChangeNotifier.java3
-rw-r--r--common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/ConfigurationDataSource.java7
-rw-r--r--common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/ConfigurationFilter.java4
-rw-r--r--common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/ConfigurationImpl.java4
-rw-r--r--common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/ConfigurationRepository.java10
-rw-r--r--common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/ContextListener.java7
-rw-r--r--common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/ConfigurationUtilsTest.java4
10 files changed, 37 insertions, 54 deletions
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/ConfigurationUtils.java b/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/ConfigurationUtils.java
index 53baaec2cf..db64f7f7fc 100644
--- a/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/ConfigurationUtils.java
+++ b/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/ConfigurationUtils.java
@@ -26,7 +26,7 @@ import org.onap.config.impl.AgglomerateConfiguration;
import org.onap.config.impl.ConfigurationDataSource;
import org.onap.config.type.ConfigurationMode;
import org.onap.config.type.ConfigurationType;
-
+
import javax.sql.DataSource;
import java.io.File;
import java.lang.reflect.Field;
@@ -67,6 +67,11 @@ import java.util.regex.Pattern;
import java.util.stream.Collectors;
import java.util.stream.Stream;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ThreadFactory;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
import static com.google.common.collect.ImmutableMap.builder;
import static java.util.Optional.ofNullable;
@@ -74,6 +79,10 @@ import static org.onap.config.api.Hint.EXTERNAL_LOOKUP;
import static org.onap.config.api.Hint.LATEST_LOOKUP;
import static org.onap.config.api.Hint.NODE_SPECIFIC;
+
+import static com.google.common.collect.ImmutableMap.builder;
+import static org.onap.config.api.Hint.*;
+
/**
* The type Configuration utils.
*/
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/AggregateConfiguration.java b/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/AggregateConfiguration.java
index c8d76d9bd9..7698d3f8ec 100644
--- a/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/AggregateConfiguration.java
+++ b/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/AggregateConfiguration.java
@@ -5,7 +5,6 @@ import org.apache.commons.configuration2.Configuration;
import org.apache.commons.configuration2.tree.MergeCombiner;
import org.apache.commons.configuration2.tree.OverrideCombiner;
import org.apache.commons.configuration2.tree.UnionCombiner;
-import static org.onap.config.Constants.LOAD_ORDER_KEY;
import org.onap.config.ConfigurationUtils;
import org.onap.config.type.ConfigurationMode;
@@ -14,6 +13,8 @@ import java.net.URL;
import java.util.HashMap;
import java.util.*;
+import static org.onap.config.Constants.LOAD_ORDER_KEY;
+
/**
* The type Aggregate configuration.
*/
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/CliConfigurationImpl.java b/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/CliConfigurationImpl.java
index 53ebf2943b..6663c85805 100644
--- a/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/CliConfigurationImpl.java
+++ b/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/CliConfigurationImpl.java
@@ -1,43 +1,27 @@
package org.onap.config.impl;
-import static org.onap.config.Constants.DB_NAMESPACE;
-import static org.onap.config.Constants.DEFAULT_NAMESPACE;
-import static org.onap.config.Constants.DEFAULT_TENANT;
-import static org.onap.config.Constants.KEY_ELEMENTS_DELEMETER;
-import static org.onap.config.Constants.LOAD_ORDER_KEY;
-import static org.onap.config.Constants.MBEAN_NAME;
-import static org.onap.config.Constants.MODE_KEY;
-import static org.onap.config.Constants.NAMESPACE_KEY;
+import org.apache.commons.configuration2.*;
+import org.onap.config.ConfigurationUtils;
+import org.onap.config.Constants;
+import org.onap.config.api.ConfigurationManager;
+import org.onap.config.api.Hint;
+import org.onap.config.type.ConfigurationQuery;
+import org.onap.config.type.ConfigurationUpdate;
import java.io.File;
import java.io.PrintWriter;
+import java.util.*;
import java.lang.management.ManagementFactory;
import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
+
import javax.management.MBeanServer;
import javax.management.MBeanServerDelegate;
import javax.management.MBeanServerNotification;
import javax.management.Notification;
import javax.management.ObjectName;
import javax.management.StandardMBean;
-import org.apache.commons.configuration2.CombinedConfiguration;
-import org.apache.commons.configuration2.CompositeConfiguration;
-import org.apache.commons.configuration2.Configuration;
-import org.apache.commons.configuration2.FileBasedConfiguration;
-import org.apache.commons.configuration2.PropertiesConfiguration;
-import org.onap.config.ConfigurationUtils;
-import org.onap.config.Constants;
-import org.onap.config.api.ConfigurationManager;
-import org.onap.config.api.Hint;
-import org.onap.config.type.ConfigurationQuery;
-import org.onap.config.type.ConfigurationUpdate;
+
+import static org.onap.config.Constants.*;
/**
* The type Cli configuration.
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/ConfigurationChangeNotifier.java b/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/ConfigurationChangeNotifier.java
index 015634b1cd..88c71c14e0 100644
--- a/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/ConfigurationChangeNotifier.java
+++ b/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/ConfigurationChangeNotifier.java
@@ -5,7 +5,7 @@ import org.onap.config.Constants;
import org.onap.config.api.ConfigurationChangeListener;
import org.onap.config.api.ConfigurationManager;
import org.onap.config.api.Hint;
-
+
import java.io.File;
import java.io.IOException;
import java.lang.management.ManagementFactory;
@@ -37,6 +37,7 @@ import javax.management.MBeanServerConnection;
import javax.management.ObjectName;
+
/**
* The type Configuration change notifier.
*/
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/ConfigurationDataSource.java b/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/ConfigurationDataSource.java
index ea9c61f635..64fd22e431 100644
--- a/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/ConfigurationDataSource.java
+++ b/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/ConfigurationDataSource.java
@@ -5,13 +5,8 @@ import org.apache.commons.dbcp2.BasicDataSource;
import org.apache.commons.lang3.StringUtils;
import org.onap.config.ConfigurationUtils;
import org.onap.config.Constants;
-
+import java.util.*;
import java.sql.Driver;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.ServiceLoader;
-import java.util.Set;
/**
* The type Configuration data source.
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/ConfigurationFilter.java b/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/ConfigurationFilter.java
index 9df69ed1d7..2956943f7e 100644
--- a/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/ConfigurationFilter.java
+++ b/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/ConfigurationFilter.java
@@ -3,6 +3,7 @@ package org.onap.config.impl;
import org.onap.config.Constants;
import org.onap.config.api.Configuration;
+import javax.servlet.annotation.WebFilter;
import java.io.IOException;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
@@ -10,7 +11,8 @@ import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
-import javax.servlet.annotation.WebFilter;
+
+
@WebFilter("/")
public class ConfigurationFilter implements Filter {
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/ConfigurationImpl.java b/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/ConfigurationImpl.java
index 7faf3ee8cf..00725b1165 100644
--- a/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/ConfigurationImpl.java
+++ b/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/ConfigurationImpl.java
@@ -1,7 +1,5 @@
package org.onap.config.impl;
-import static org.onap.config.ConfigurationUtils.getConfigurationRepositoryKey;
-
import org.apache.commons.configuration2.Configuration;
import org.apache.commons.configuration2.DatabaseConfiguration;
import org.onap.config.ConfigurationUtils;
@@ -26,6 +24,8 @@ import java.util.Map;
import java.util.Set;
import java.util.function.Predicate;
+import static org.onap.config.ConfigurationUtils.getConfigurationRepositoryKey;
+
/**
* The type Configuration.
*/
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/ConfigurationRepository.java b/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/ConfigurationRepository.java
index 1c3bc1313f..953f793b9d 100644
--- a/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/ConfigurationRepository.java
+++ b/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/ConfigurationRepository.java
@@ -12,15 +12,7 @@ import org.onap.config.Constants;
import java.io.File;
import java.sql.Timestamp;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.Map;
-import java.util.Set;
+import java.util.*;
/**
* The type Configuration repository.
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/ContextListener.java b/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/ContextListener.java
index cf87db936d..cc31e775b7 100644
--- a/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/ContextListener.java
+++ b/common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/impl/ContextListener.java
@@ -1,13 +1,14 @@
package org.onap.config.impl;
-import static org.onap.config.Constants.MBEAN_NAME;
+import org.onap.config.api.ConfigurationManager;
-import java.lang.management.ManagementFactory;
import javax.management.ObjectName;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;
-import org.onap.config.api.ConfigurationManager;
+import java.lang.management.ManagementFactory;
+
+import static org.onap.config.Constants.MBEAN_NAME;
@WebListener
public class ContextListener implements ServletContextListener {
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/ConfigurationUtilsTest.java b/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/ConfigurationUtilsTest.java
index 90966fccf6..707573640b 100644
--- a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/ConfigurationUtilsTest.java
+++ b/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/ConfigurationUtilsTest.java
@@ -5,9 +5,7 @@ import org.junit.Test;
import java.util.Arrays;
import java.util.List;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.*;
public class ConfigurationUtilsTest {
@Test