You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@linkis.apache.org by GitBox <gi...@apache.org> on 2022/03/21 02:28:10 UTC

[GitHub] [incubator-linkis] peacewong opened a new issue #1763: [Bug] API /linkisManager/rm/applicationlist has NPE bug

peacewong opened a new issue #1763:
URL: https://github.com/apache/incubator-linkis/issues/1763


   ### Search before asking
   
   - [X] I searched the [issues](https://github.com/apache/incubator-linkis/issues) and found no similar issues.
   
   
   ### Linkis Component
   
   linkis-cg-manager
   
   ### What happened + What you expected to happen
   
   ![image](https://user-images.githubusercontent.com/11496700/159197939-1f075f9e-ec4a-48f1-910d-8bf03ee54515.png)
   
   
   ### Relevent platform
   
   Class: RMMonitorRest
   ```
   @RequestMapping(path = Array("applicationlist"), method = Array(RequestMethod.POST))
     def getApplicationList(request: HttpServletRequest, @RequestBody param: util.Map[String, AnyRef]): Message
   
    val applicationList = creatorToApplicationList(userCreatorLabel.getCreator)
             applicationList.put("usedResource", applicationList("usedResource").asInstanceOf[Resource] + node.getNodeResource.getUsedResource)
             applicationList.put("maxResource", applicationList("maxResource").asInstanceOf[Resource] + node.getNodeResource.getMaxResource)
             applicationList.put("minResource", applicationList("minResource").asInstanceOf[Resource] + node.getNodeResource.getMinResource)
             applicationList.put("lockedResource", applicationList("lockedResource").asInstanceOf[Resource] + node.getNodeResource.getLockedResource)
   ```
   The above code does not make a null value judgment during the asInstance
   
   ### Reproduction script
   
   no
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [X] Yes I am willing to submit a PR!


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

To unsubscribe, e-mail: dev-unsubscribe@linkis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@linkis.apache.org
For additional commands, e-mail: dev-help@linkis.apache.org