You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/03/26 12:16:34 UTC

[GitHub] rabbah commented on a change in pull request #3340: Default activation response to empty JsObject.

rabbah commented on a change in pull request #3340: Default activation response to empty JsObject.
URL: https://github.com/apache/incubator-openwhisk/pull/3340#discussion_r177068675
 
 

 ##########
 File path: common/scala/src/main/scala/whisk/core/entity/WhiskActivation.scala
 ##########
 @@ -97,13 +97,13 @@ case class WhiskActivation(namespace: EntityPath,
       super.summaryAsJson.fields - "updated" +
         ("activationId" -> activationId.toJson) +
         ("start" -> start.toJson) ++
-        cause.map(("cause" -> _.toJson)) ++
+        cause.map("cause" -> _.toJson) ++
         actionOrNot())
   }
 
-  def resultAsJson = response.result.toJson.asJsObject
+  def resultAsJson: JsObject = response.result.map(_.toJson.asJsObject).getOrElse(JsObject.empty)
 
-  def toExtendedJson = {
+  def toExtendedJson: JsObject = {
 
 Review comment:
   i checked it - it's fine.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services