diff --git a/src/main/java/org/bdware/server/action/CMActions.java b/src/main/java/org/bdware/server/action/CMActions.java index b90eaef..5ede0cd 100644 --- a/src/main/java/org/bdware/server/action/CMActions.java +++ b/src/main/java/org/bdware/server/action/CMActions.java @@ -123,23 +123,14 @@ public class CMActions implements OnHashCallback { resultCallback.onResult(MISSING_ARGUMENT); return; } - if (args.has("contractDOI") && !args.has("contractID")) { - LOGGER.debug("contractDOI: " + args.get("contractDOI").getAsString()); - try { - cReq.setContractDOI(args.get("contractDOI").getAsString()); - } catch (Exception e) { - e.printStackTrace(); - resultCallback.onResult(INVALID_DOI); - return; - } - } else { - if (args.has("contractName")) { - cReq.setContractID(args.get("contractName").getAsString()); - } - if (args.has("contractID")) { - cReq.setContractID(args.get("contractID").getAsString()); - } + + if (args.has("contractName")) { + cReq.setContractID(args.get("contractName").getAsString()); } + if (args.has("contractID")) { + cReq.setContractID(args.get("contractID").getAsString()); + } + if (args.has("isDebug")) { cReq.setFromDebug(args.get("isDebug").getAsBoolean()); } @@ -544,9 +535,9 @@ public class CMActions implements OnHashCallback { jo.remove("isInsnLimit"); jo.remove("size"); try { - if (jo.has("result") && jo.get("result").isJsonPrimitive()){ + if (jo.has("result") && jo.get("result").isJsonPrimitive()) { String resultStr = jo.get("result").getAsString(); - jo.add("result",JsonParser.parseString(resultStr)); + jo.add("result", JsonParser.parseString(resultStr)); } } catch (Exception e) { } diff --git a/src/main/java/org/bdware/server/doip/ContractRepositoryHandler.java b/src/main/java/org/bdware/server/doip/ContractRepositoryHandler.java index 60adebf..aeab986 100644 --- a/src/main/java/org/bdware/server/doip/ContractRepositoryHandler.java +++ b/src/main/java/org/bdware/server/doip/ContractRepositoryHandler.java @@ -226,8 +226,6 @@ public class ContractRepositoryHandler extends RepositoryHandlerBase implements ContractRequest cr = new ContractRequest(); cr.setContractID(cc.getContractID()); - cr.setContractDOI(doipMessage.header.parameters.id); - if (args.has("withDynamicAnalysis")) cr.withDynamicAnalysis = args.get("withDynamicAnalysis").getAsBoolean(); if (args.has("withEvaluatesAnalysis")) cr.withEvaluatesAnalysis = args.get("withEvaluatesAnalysis").getAsBoolean();