summaryrefslogtreecommitdiffstats
path: root/common/onap-common-configuration-management/onap-configuration-management-core/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'common/onap-common-configuration-management/onap-configuration-management-core/src/main')
-rw-r--r--common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/ConfigurationUtils.java8
1 files changed, 5 insertions, 3 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 85698e89de..c13a3a458a 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
@@ -20,8 +20,8 @@
package org.onap.config;
import com.virtlink.commons.configuration2.jackson.JsonConfiguration;
-import net.sf.corn.cps.CPScanner;
-import net.sf.corn.cps.ResourceFilter;
+import io.github.classgraph.ClassGraph;
+import io.github.classgraph.ScanResult;
import org.apache.commons.configuration2.Configuration;
import org.apache.commons.configuration2.CompositeConfiguration;
import org.apache.commons.configuration2.FileBasedConfiguration;
@@ -401,7 +401,9 @@ public class ConfigurationUtils {
}
public static List<URL> getAllClassPathResources() {
- return CPScanner.scanResources(new ResourceFilter());
+ try (ScanResult scanResult = new ClassGraph().scan()) {
+ return scanResult.getAllResources().getURLs();
+ }
}
public static BasicConfigurationBuilder<FileBasedConfiguration> getConfigurationBuilder(File file) {