diff --git a/constants.properties b/constants.properties index 08c51160d2..4a2bc66011 100644 --- a/constants.properties +++ b/constants.properties @@ -20,7 +20,7 @@ quasarVersion11=0.8.0_r3 jdkClassifier11=jdk11 proguardVersion=6.1.1 bouncycastleVersion=1.66 -classgraphVersion=4.8.78 +classgraphVersion=4.8.89 disruptorVersion=3.4.2 typesafeConfigVersion=1.3.4 jsr305Version=3.0.2 diff --git a/node/src/main/kotlin/net/corda/node/internal/cordapp/JarScanningCordappLoader.kt b/node/src/main/kotlin/net/corda/node/internal/cordapp/JarScanningCordappLoader.kt index bb2fce1a58..4098576b03 100644 --- a/node/src/main/kotlin/net/corda/node/internal/cordapp/JarScanningCordappLoader.kt +++ b/node/src/main/kotlin/net/corda/node/internal/cordapp/JarScanningCordappLoader.kt @@ -348,7 +348,7 @@ class JarScanningCordappLoader private constructor(private val cordappJarPaths: val cordappElement = cordappJarPath.url.toString() logger.info("Scanning CorDapp in $cordappElement") val scanResult = ClassGraph() - .filterClasspathElements { elt -> elt == cordappElement } + .filterClasspathElementsByURL { elt -> elt == cordappJarPath.url } .overrideClassLoaders(appClassLoader) .ignoreParentClassLoaders() .enableAllInfo() diff --git a/testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/CustomCordapp.kt b/testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/CustomCordapp.kt index 37590387b3..d461becbfc 100644 --- a/testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/CustomCordapp.kt +++ b/testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/CustomCordapp.kt @@ -50,12 +50,12 @@ data class CustomCordapp( @VisibleForTesting internal fun packageAsJar(file: Path) { val classGraph = ClassGraph() - if(packages.isNotEmpty()){ - classGraph.whitelistPaths(*packages.map { it.replace('.', '/') }.toTypedArray()) + if (packages.isNotEmpty()) { + classGraph.acceptPaths(*packages.map { it.replace('.', '/') }.toTypedArray()) } if (classes.isNotEmpty()) { classes.forEach { classGraph.addClassLoader(it.classLoader) } - classGraph.whitelistClasses(*classes.map { it.name }.toTypedArray()) + classGraph.acceptClasses(*classes.map { it.name }.toTypedArray()) } classGraph.enableClassInfo().pooledScan().use { scanResult -> diff --git a/testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/TestCordappImpl.kt b/testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/TestCordappImpl.kt index 40cc21ec93..68b37b5247 100644 --- a/testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/TestCordappImpl.kt +++ b/testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/TestCordappImpl.kt @@ -56,7 +56,7 @@ data class TestCordappImpl(val scanPackage: String, override val config: Map { return packageToRootPaths.computeIfAbsent(scanPackage) { - val classGraph = ClassGraph().whitelistPaths(scanPackage.replace('.', '/')) + val classGraph = ClassGraph().acceptPaths(scanPackage.replace('.', '/')) classGraph.pooledScan().use { scanResult -> scanResult.allResources .asSequence()