Merge branch 'master' into feature/kotlin-contract-support
This commit is contained in:
@@ -2,7 +2,7 @@ version: 2
|
||||
jobs:
|
||||
build:
|
||||
docker:
|
||||
- image: springcloud/pipeline-base
|
||||
- image: cloudpipelines/pipeline-base
|
||||
environment:
|
||||
JAVA_TOOL_OPTIONS: "-Xms64m -Xmx300m"
|
||||
GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xms64m -Xmx300m -XX:+HeapDumpOnOutOfMemoryError" -Dorg.gradle.daemon=false'
|
||||
|
||||
@@ -128,19 +128,16 @@ class ContractVerifierDslConverter implements ContractConverter<Collection<Contr
|
||||
private static Object toObject(ClassLoader cl, File rootFolder, File dsl) {
|
||||
if (isJava(dsl)) {
|
||||
try {
|
||||
return parseJavaFile(cl, dsl)
|
||||
return parseJavaFile(dsl)
|
||||
}
|
||||
catch (Exception ex) {
|
||||
if (log.isWarnEnabled()) {
|
||||
log.warn("Exception occurred while trying to parse the file [" + dsl + "] as a contract. Will not parse it.", ex)
|
||||
}
|
||||
return null
|
||||
throw new DslParseException("Exception occurred while trying to parse the file [" + dsl + "] as a contract. Will not parse it.", ex)
|
||||
}
|
||||
}
|
||||
return groovyShell(cl, rootFolder).evaluate(dsl)
|
||||
}
|
||||
|
||||
private static Object parseJavaFile(ClassLoader cl, File dsl) {
|
||||
private static Object parseJavaFile(File dsl) {
|
||||
Constructor<?> constructor = classConstructor(dsl)
|
||||
Object newInstance = constructor.newInstance()
|
||||
if (!newInstance instanceof Supplier) {
|
||||
@@ -161,7 +158,7 @@ class ContractVerifierDslConverter implements ContractConverter<Collection<Contr
|
||||
if (!compilationResult.wasSuccessful()) {
|
||||
throw new IllegalStateException("Exceptions occurred while trying to compile the file " + compilationResult.compilationMessages)
|
||||
}
|
||||
Class<?> clazz = compilationResult.compiledClasses.find { it.name == fqn}
|
||||
Class<?> clazz = compilationResult.compiledClasses.find { it.name == fqn }
|
||||
if (clazz == null) {
|
||||
throw new IllegalStateException("Class with name [" + fqn + "] not found")
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
<logger name="com.github.jknack.handlebars.internal" level="INFO"/>
|
||||
|
||||
<logger name="org.springframework.cloud.function" level="INFO"/>
|
||||
<!-- <logger name="org.springframework.cloud.function" level="INFO"/>-->
|
||||
|
||||
<root level="DEBUG">
|
||||
<appender-ref ref="STDOUT"/>
|
||||
|
||||
Reference in New Issue
Block a user