|
|
@@ -16,24 +16,25 @@ import java.util.Optional;
|
|
|
*/
|
|
|
@Component
|
|
|
public class CodeJudgeThirdPartyServiceImpl implements com.nju.edu.eval.thirdparty.CodeJudgeThirdPartyService {
|
|
|
- @Value("${code-judgement-client.host}")
|
|
|
- private String host;
|
|
|
-
|
|
|
- private CodeJudgeClient client;
|
|
|
+// @Value("${code-judgement-client.host}")
|
|
|
+// private String host;
|
|
|
+//
|
|
|
+// private CodeJudgeClient client;
|
|
|
|
|
|
@PostConstruct
|
|
|
public void init() {
|
|
|
- client = new CodeJudgeClient(host);
|
|
|
+// client = new CodeJudgeClient(host);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public Optional<JudgeResult> judgeCodeQuestionAnswers(JudgeDTO judgeDTO) {
|
|
|
- try {
|
|
|
- judgeDTO.setTimeLimit(1000);
|
|
|
- System.out.println(judgeDTO);
|
|
|
- return Optional.of(client.judge(judgeDTO));
|
|
|
- } catch (CodeJudgeSystemException judgementException) {
|
|
|
- return Optional.empty();
|
|
|
- }
|
|
|
+// try {
|
|
|
+// judgeDTO.setTimeLimit(1000);
|
|
|
+// System.out.println(judgeDTO);
|
|
|
+// return Optional.of(client.judge(judgeDTO));
|
|
|
+// } catch (CodeJudgeSystemException judgementException) {
|
|
|
+// return Optional.empty();
|
|
|
+// }
|
|
|
+ return Optional.empty();
|
|
|
}
|
|
|
}
|