summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris André <chris.andre@yoppworks.com>2020-05-22 13:48:27 -0400
committerSébastien Determe <sebastien.determe@intl.att.com>2020-08-12 09:40:44 +0000
commit568cb3a56c5ea2468a014efcf95d1fd388076b1a (patch)
tree38692320bb490366da74125815da4c829ddafaa9
parent547b491752b577aff4a3c0f520cc87247e2f2c38 (diff)
Java 11 Migration work for 'openecomp-sdc-translator-core'
- Replaced Corn CPS with ClassGraph Issue-ID: SDC-3029 Signed-off-by: Chris Andre <chris.andre@yoppworks.com> Change-Id: I3002f3aa01a647d6ab2f4c32c399833034241800
-rwxr-xr-xcommon/onap-common-configuration-management/onap-configuration-management-core/pom.xml12
-rw-r--r--common/onap-common-configuration-management/onap-configuration-management-core/src/main/java/org/onap/config/ConfigurationUtils.java8
2 files changed, 8 insertions, 12 deletions
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/pom.xml b/common/onap-common-configuration-management/onap-configuration-management-core/pom.xml
index cbf68742b4..cf74fa1c37 100755
--- a/common/onap-common-configuration-management/onap-configuration-management-core/pom.xml
+++ b/common/onap-common-configuration-management/onap-configuration-management-core/pom.xml
@@ -69,15 +69,9 @@
<artifactId>commons-io</artifactId>
</dependency>
<dependency>
- <groupId>net.sf.corn</groupId>
- <artifactId>corn-cps</artifactId>
- <version>1.1.7</version>
- <exclusions>
- <exclusion>
- <groupId>com.sun</groupId>
- <artifactId>tools</artifactId>
- </exclusion>
- </exclusions>
+ <groupId>io.github.classgraph</groupId>
+ <artifactId>classgraph</artifactId>
+ <version>4.8.78</version>
</dependency>
<dependency>
<groupId>com.virtlink.commons</groupId>
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) {