From d60430856388826d54317964b3d2da897e18590c Mon Sep 17 00:00:00 2001 From: Chris Rankin Date: Thu, 19 Sep 2019 22:04:24 +0100 Subject: [PATCH] CORDA-3137: Enhance annotation handling so that we can allow some annotations to be mapped into the sandbox without also needing to be stitched. (#72) --- build.gradle | 3 +++ .../kotlin/net/corda/djvm/serialization/TestBase.kt | 12 +++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index bf5254cc47..9ba3dc5beb 100644 --- a/build.gradle +++ b/build.gradle @@ -23,6 +23,9 @@ allprojects { maven { url "$artifactory_contextUrl/corda-dev" } + maven { + url "$artifactory_contextUrl/corda-dependencies" + } } configurations { diff --git a/src/test/kotlin/net/corda/djvm/serialization/TestBase.kt b/src/test/kotlin/net/corda/djvm/serialization/TestBase.kt index 8495c8a209..1a5a90e7a0 100644 --- a/src/test/kotlin/net/corda/djvm/serialization/TestBase.kt +++ b/src/test/kotlin/net/corda/djvm/serialization/TestBase.kt @@ -81,16 +81,21 @@ abstract class TestBase(type: SandboxType) { } fun sandbox(action: SandboxRuntimeContext.() -> Unit) { - return sandbox(WARNING, emptySet(), false, action) + return sandbox(WARNING, emptySet(), emptySet(), false, action) } fun sandbox(visibleAnnotations: Set>, action: SandboxRuntimeContext.() -> Unit) { - return sandbox(WARNING, visibleAnnotations, false, action) + return sandbox(WARNING, visibleAnnotations, emptySet(), false, action) + } + + fun sandbox(visibleAnnotations: Set>, sandboxOnlyAnnotations: Set, action: SandboxRuntimeContext.() -> Unit) { + return sandbox(WARNING, visibleAnnotations, sandboxOnlyAnnotations, false, action) } fun sandbox( minimumSeverityLevel: Severity, visibleAnnotations: Set>, + sandboxOnlyAnnotations: Set, enableTracing: Boolean, action: SandboxRuntimeContext.() -> Unit ) { @@ -101,7 +106,8 @@ abstract class TestBase(type: SandboxType) { val analysisConfiguration = configuration.analysisConfiguration.createChild( userSource = userSource, newMinimumSeverityLevel = minimumSeverityLevel, - visibleAnnotations = visibleAnnotations + visibleAnnotations = visibleAnnotations, + sandboxOnlyAnnotations = sandboxOnlyAnnotations ) SandboxRuntimeContext(SandboxConfiguration.of( configuration.executionProfile,