openwhisk-issues mailing list archives

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

 ##########
 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:
   That’s a good point. If the property 
    doesn’t exist then fall back to the old code. 

----------------------------------------------------------------
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