diff --git a/build.gradle b/build.gradle index b212c1f..e5ddc72 100644 --- a/build.gradle +++ b/build.gradle @@ -39,21 +39,19 @@ dependencies { api 'berkeleydb:je:3.2.76' // api 'com.fifesoft:rsyntaxtextarea:3.1.3' api 'commons-io:commons-io:2.11.0' - api 'io.netty:netty-all:4.1.72.Final' + api 'io.netty:netty-all:4.1.77.Final' api 'org.antlr:antlr4:4.9.2' api 'commons-codec:commons-codec:1.5' api 'org.apache.logging.log4j:log4j-core:2.17.2' api 'org.apache.logging.log4j:log4j-api:2.17.2' //api 'org.apache.velocity:velocity-engine-core:2.3' api 'org.rocksdb:rocksdbjni:7.3.1' - // api fileTree(dir: 'lib', include: '*.jar') - testImplementation 'junit:junit:4.13.2' implementation 'org.bdware.doip:doip-audit-tool:1.1.2' } group = "org.bdware.sc" -version = "1.6.5" +version = "1.6.3" tasks.processResources.setDuplicatesStrategy(DuplicatesStrategy.INCLUDE) diff --git a/src/main/base/org/bdware/sc/ContractResult.java b/src/main/base/org/bdware/sc/ContractResult.java index a5fb9ca..97984d0 100644 --- a/src/main/base/org/bdware/sc/ContractResult.java +++ b/src/main/base/org/bdware/sc/ContractResult.java @@ -26,6 +26,10 @@ public class ContractResult { } public enum Status { - Success, Exception, Error, Executing + Success, Exception, Error; + public Status merge(Status status) { + if (status == null) status = Error; + return this.ordinal() < status.ordinal() ? status : this; + } } } \ No newline at end of file diff --git a/src/main/base/org/bdware/sc/node/AnnotationHook.java b/src/main/base/org/bdware/sc/node/AnnotationHook.java index 25e12f3..0cbacc5 100644 --- a/src/main/base/org/bdware/sc/node/AnnotationHook.java +++ b/src/main/base/org/bdware/sc/node/AnnotationHook.java @@ -1,8 +1,7 @@ package org.bdware.sc.node; import org.bdware.sc.JSEngine; -import org.bdware.sc.bean.ContractRequest; public interface AnnotationHook { - Object handle(ContractRequest input, JSEngine desktopEngine, Object ret); + ArgPacks handle(JSEngine desktopEngine, ArgPacks argPacks); } diff --git a/src/main/base/org/bdware/sc/node/ArgPacks.java b/src/main/base/org/bdware/sc/node/ArgPacks.java new file mode 100644 index 0000000..a72bf49 --- /dev/null +++ b/src/main/base/org/bdware/sc/node/ArgPacks.java @@ -0,0 +1,15 @@ +package org.bdware.sc.node; + +import org.bdware.sc.bean.ContractRequest; + +public class ArgPacks { + public Object ret; + public ContractRequest request; + public Object arg; + + public ArgPacks(ContractRequest request, Object arg, Object ret) { + this.request = request; + this.arg = arg; + this.ret = ret; + } +}