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

bugfix npe monitor jobid may be null #1701

Merged
merged 2 commits into from
Apr 1, 2024
Merged

bugfix npe monitor jobid may be null #1701

merged 2 commits into from
Apr 1, 2024

Conversation

tomsun28
Copy link
Contributor

What's changed?

java.lang.NullPointerException: Cannot invoke "Object.hashCode()" because "key" is null
    at java.base/java.util.concurrent.ConcurrentHashMap.replaceNode(ConcurrentHashMap.java:1111)
    at java.base/java.util.concurrent.ConcurrentHashMap.remove(ConcurrentHashMap.java:1102)
    at java.base/java.util.concurrent.ConcurrentHashMap$KeySetView.remove(ConcurrentHashMap.java:4626)
    at org.dromara.hertzbeat.manager.scheduler.CollectorAndJobScheduler.cancelAsyncCollectJob(CollectorAndJobScheduler.java:431)
    at org.dromara.hertzbeat.manager.service.impl.MonitorServiceImpl.deleteMonitors(MonitorServiceImpl.java:600)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:351)

Checklist

  • I hereby agree to the terms of the HertzBeat CLA
  • I have read the Contributing Guide
  • I have written the necessary doc or comment.
  • I have added the necessary unit tests and all cases have passed.

Add or update API

  • I have added the necessary e2e tests and all cases have passed.

Signed-off-by: tomsun28 <tomsun28@outlook.com>
@tomsun28 tomsun28 added this to the 1.5.1 milestone Mar 31, 2024
@tomsun28 tomsun28 requested a review from zqr10159 April 1, 2024 12:21
Copy link
Member

@zqr10159 zqr10159 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@zqr10159 zqr10159 merged commit f33226f into master Apr 1, 2024
2 checks passed
@zqr10159 zqr10159 deleted the bugfix-npe branch April 1, 2024 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants