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)

This commit is contained in:
Chris Rankin 2019-09-19 22:04:24 +01:00 committed by GitHub
parent 8718433be6
commit d604308563
2 changed files with 12 additions and 3 deletions

View File

@ -23,6 +23,9 @@ allprojects {
maven { maven {
url "$artifactory_contextUrl/corda-dev" url "$artifactory_contextUrl/corda-dev"
} }
maven {
url "$artifactory_contextUrl/corda-dependencies"
}
} }
configurations { configurations {

View File

@ -81,16 +81,21 @@ abstract class TestBase(type: SandboxType) {
} }
fun sandbox(action: SandboxRuntimeContext.() -> Unit) { fun sandbox(action: SandboxRuntimeContext.() -> Unit) {
return sandbox(WARNING, emptySet(), false, action) return sandbox(WARNING, emptySet(), emptySet(), false, action)
} }
fun sandbox(visibleAnnotations: Set<Class<out Annotation>>, action: SandboxRuntimeContext.() -> Unit) { fun sandbox(visibleAnnotations: Set<Class<out Annotation>>, action: SandboxRuntimeContext.() -> Unit) {
return sandbox(WARNING, visibleAnnotations, false, action) return sandbox(WARNING, visibleAnnotations, emptySet(), false, action)
}
fun sandbox(visibleAnnotations: Set<Class<out Annotation>>, sandboxOnlyAnnotations: Set<String>, action: SandboxRuntimeContext.() -> Unit) {
return sandbox(WARNING, visibleAnnotations, sandboxOnlyAnnotations, false, action)
} }
fun sandbox( fun sandbox(
minimumSeverityLevel: Severity, minimumSeverityLevel: Severity,
visibleAnnotations: Set<Class<out Annotation>>, visibleAnnotations: Set<Class<out Annotation>>,
sandboxOnlyAnnotations: Set<String>,
enableTracing: Boolean, enableTracing: Boolean,
action: SandboxRuntimeContext.() -> Unit action: SandboxRuntimeContext.() -> Unit
) { ) {
@ -101,7 +106,8 @@ abstract class TestBase(type: SandboxType) {
val analysisConfiguration = configuration.analysisConfiguration.createChild( val analysisConfiguration = configuration.analysisConfiguration.createChild(
userSource = userSource, userSource = userSource,
newMinimumSeverityLevel = minimumSeverityLevel, newMinimumSeverityLevel = minimumSeverityLevel,
visibleAnnotations = visibleAnnotations visibleAnnotations = visibleAnnotations,
sandboxOnlyAnnotations = sandboxOnlyAnnotations
) )
SandboxRuntimeContext(SandboxConfiguration.of( SandboxRuntimeContext(SandboxConfiguration.of(
configuration.executionProfile, configuration.executionProfile,