Merge remote-tracking branch 'origin/release/os/4.5' into rni/notick/os-45-46-docs-db

This commit is contained in:
Ross Nicoll 2020-09-01 17:00:00 +01:00
commit d928c29019
4 changed files with 6 additions and 6 deletions

View File

@ -20,7 +20,7 @@ quasarVersion11=0.8.0_r3
jdkClassifier11=jdk11 jdkClassifier11=jdk11
proguardVersion=6.1.1 proguardVersion=6.1.1
bouncycastleVersion=1.66 bouncycastleVersion=1.66
classgraphVersion=4.8.78 classgraphVersion=4.8.89
disruptorVersion=3.4.2 disruptorVersion=3.4.2
typesafeConfigVersion=1.3.4 typesafeConfigVersion=1.3.4
jsr305Version=3.0.2 jsr305Version=3.0.2

View File

@ -348,7 +348,7 @@ class JarScanningCordappLoader private constructor(private val cordappJarPaths:
val cordappElement = cordappJarPath.url.toString() val cordappElement = cordappJarPath.url.toString()
logger.info("Scanning CorDapp in $cordappElement") logger.info("Scanning CorDapp in $cordappElement")
val scanResult = ClassGraph() val scanResult = ClassGraph()
.filterClasspathElements { elt -> elt == cordappElement } .filterClasspathElementsByURL { elt -> elt == cordappJarPath.url }
.overrideClassLoaders(appClassLoader) .overrideClassLoaders(appClassLoader)
.ignoreParentClassLoaders() .ignoreParentClassLoaders()
.enableAllInfo() .enableAllInfo()

View File

@ -50,12 +50,12 @@ data class CustomCordapp(
@VisibleForTesting @VisibleForTesting
internal fun packageAsJar(file: Path) { internal fun packageAsJar(file: Path) {
val classGraph = ClassGraph() val classGraph = ClassGraph()
if(packages.isNotEmpty()){ if (packages.isNotEmpty()) {
classGraph.whitelistPaths(*packages.map { it.replace('.', '/') }.toTypedArray()) classGraph.acceptPaths(*packages.map { it.replace('.', '/') }.toTypedArray())
} }
if (classes.isNotEmpty()) { if (classes.isNotEmpty()) {
classes.forEach { classGraph.addClassLoader(it.classLoader) } 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 -> classGraph.enableClassInfo().pooledScan().use { scanResult ->

View File

@ -56,7 +56,7 @@ data class TestCordappImpl(val scanPackage: String, override val config: Map<Str
private fun findRootPaths(scanPackage: String): Set<Path> { private fun findRootPaths(scanPackage: String): Set<Path> {
return packageToRootPaths.computeIfAbsent(scanPackage) { return packageToRootPaths.computeIfAbsent(scanPackage) {
val classGraph = ClassGraph().whitelistPaths(scanPackage.replace('.', '/')) val classGraph = ClassGraph().acceptPaths(scanPackage.replace('.', '/'))
classGraph.pooledScan().use { scanResult -> classGraph.pooledScan().use { scanResult ->
scanResult.allResources scanResult.allResources
.asSequence() .asSequence()