Skip to content

[Bug] API /linkisManager/rm/applicationlist has NPE bug #1763

@peacewong

Description

@peacewong

Search before asking

  • I searched the issues and found no similar issues.

Linkis Component

linkis-cg-manager

What happened + What you expected to happen

image

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?

  • Yes I am willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingeasy to fixproblems that are identified to be easy to fix.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions