You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@linkis.apache.org by pe...@apache.org on 2021/12/07 14:12:05 UTC
[incubator-linkis] branch dev-1.0.3 updated: fix NPE for CsJobListener#onJobCompleted
This is an automated email from the ASF dual-hosted git repository.
peacewong pushed a commit to branch dev-1.0.3
in repository https://gitbox.apache.org/repos/asf/incubator-linkis.git
The following commit(s) were added to refs/heads/dev-1.0.3 by this push:
new 41554eb fix NPE for CsJobListener#onJobCompleted
new 7b22b14 Merge pull request #1166 from legendtkl/CsJobListenerNPE
41554eb is described below
commit 41554ebb993f1afbe894802918ecef717061b591
Author: taokelu <ta...@bytedance.com>
AuthorDate: Tue Dec 7 21:29:19 2021 +0800
fix NPE for CsJobListener#onJobCompleted
---
.../org/apache/linkis/cs/server/scheduler/impl/CsJobListener.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/linkis-public-enhancements/linkis-context-service/linkis-cs-server/src/main/java/org/apache/linkis/cs/server/scheduler/impl/CsJobListener.java b/linkis-public-enhancements/linkis-context-service/linkis-cs-server/src/main/java/org/apache/linkis/cs/server/scheduler/impl/CsJobListener.java
index 7e409d3..9426615 100644
--- a/linkis-public-enhancements/linkis-context-service/linkis-cs-server/src/main/java/org/apache/linkis/cs/server/scheduler/impl/CsJobListener.java
+++ b/linkis-public-enhancements/linkis-context-service/linkis-cs-server/src/main/java/org/apache/linkis/cs/server/scheduler/impl/CsJobListener.java
@@ -57,7 +57,9 @@ public class CsJobListener implements JobListener {
HttpResponseProtocol responseProtocol = answerJob.getResponseProtocol();
if (!job.isSucceed() && responseProtocol instanceof RestResponseProtocol) {
ErrorExecuteResponse errorResponse = job.getErrorResponse();
- ((RestResponseProtocol) responseProtocol).error(errorResponse.message(), errorResponse.t());
+ if (errorResponse != null) {
+ ((RestResponseProtocol) responseProtocol).error(errorResponse.message(), errorResponse.t());
+ }
}
answerJob.getResponseProtocol().notifyJob();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@linkis.apache.org
For additional commands, e-mail: commits-help@linkis.apache.org