This is an automated email from the ASF dual-hosted git repository.
peacewong pushed a commit to branch dev-1.3.2
in repository https://gitbox.apache.org/repos/asf/incubator-linkis.git
The following commit(s) were added to refs/heads/dev-1.3.2 by this push:
new 8ebbe337e fix(linkis-common): local rpc getResponse NPE (#3739)
8ebbe337e is described below
commit 8ebbe337e53e7ae860b43ed16a0f05217817d8f4
Author: Jack Xu <[email protected]>
AuthorDate: Sat Oct 29 14:34:14 2022 +0800
fix(linkis-common): local rpc getResponse NPE (#3739)
---
.../org/apache/linkis/server/restful/SpringRestfulCatchAOP.scala | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git
a/linkis-commons/linkis-module/src/main/scala/org/apache/linkis/server/restful/SpringRestfulCatchAOP.scala
b/linkis-commons/linkis-module/src/main/scala/org/apache/linkis/server/restful/SpringRestfulCatchAOP.scala
index 3c03417b1..c02527af7 100644
---
a/linkis-commons/linkis-module/src/main/scala/org/apache/linkis/server/restful/SpringRestfulCatchAOP.scala
+++
b/linkis-commons/linkis-module/src/main/scala/org/apache/linkis/server/restful/SpringRestfulCatchAOP.scala
@@ -46,7 +46,10 @@ class SpringRestfulCatchAOP extends Logging {
}
}
// convert http status code
- getCurrentHttpResponse.setStatus(Message.messageToHttpStatus(resp))
+ val response = getCurrentHttpResponse
+ if (response != null) {
+ getCurrentHttpResponse.setStatus(Message.messageToHttpStatus(resp))
+ }
resp
}
@@ -54,8 +57,7 @@ class SpringRestfulCatchAOP extends Logging {
val requestAttributes = RequestContextHolder.getRequestAttributes
requestAttributes match {
case attributes: ServletRequestAttributes =>
- val response = attributes.getResponse
- response
+ attributes.getResponse
case _ => null
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]