openwhisk-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [openwhisk] chetanmeh commented on a change in pull request #4702: Fixed to check entityType when deserializing entity
Date Thu, 24 Oct 2019 04:52:58 GMT
chetanmeh commented on a change in pull request #4702: Fixed to check entityType when deserializing
entity
URL: https://github.com/apache/openwhisk/pull/4702#discussion_r338380915
 
 

 ##########
 File path: common/scala/src/main/scala/org/apache/openwhisk/core/entity/WhiskEntity.scala
 ##########
 @@ -115,7 +116,8 @@ object WhiskEntity {
 
 object WhiskDocumentReader extends DocumentReader {
   override def read[A](ma: Manifest[A], value: JsValue) = {
-    ma.runtimeClass match {
+    val entityType = value.asJsObject.fields("entityType").convertTo[String]
 
 Review comment:
   `entityType` is technically an optional attribute as it was introduced later (#3164). So
need to treat that as `Option`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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

Mime
View raw message