Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
2 tasks done
peacewong opened this issue Mar 21, 2022 · 0 comments
Closed
2 tasks done

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

peacewong opened this issue Mar 21, 2022 · 0 comments
Labels
bug Something isn't working easy to fix problems that are identified to be easy to fix.

Comments

@peacewong
Copy link
Contributor

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!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working easy to fix problems that are identified to be easy to fix.
Projects
None yet
Development

No branches or pull requests

2 participants