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] Fix NullPointerException #2849

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

ayu-v0
Copy link
Contributor

@ayu-v0 ayu-v0 commented Dec 1, 2024

What's changed?

#2847

This PR fixes the NullPointerException that occurs when foreach is called when Set is null.

Checklist

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

@zqr10159 zqr10159 requested a review from tomsun28 December 1, 2024 14:13
@ayu-v0
Copy link
Contributor Author

ayu-v0 commented Dec 4, 2024

Oh,The merge error is caused by the absence of space after if. I will correct it @yuluo-yx

@tomsun28
Copy link
Contributor

tomsun28 commented Dec 4, 2024

hi @ayu-v0 thanks for pr. Due the discuss #2847 , suggest we solved this by find why the getNextCollectMetrics first time return null instead of ignore the NPE.

@tomsun28 tomsun28 added this to the 1.6.2 milestone Dec 4, 2024
@ayu-v0
Copy link
Contributor Author

ayu-v0 commented Dec 5, 2024

hi @ayu-v0 thanks for pr. Due the discuss #2847 , suggest we solved this by find why the getNextCollectMetrics first time return null instead of ignore the NPE.

Thank you very much for your review. I shall try to ascertain further the cause of the problem.

@ayu-v0
Copy link
Contributor Author

ayu-v0 commented Dec 19, 2024

I found that when setting the monitoring time to 10 seconds, this situation will occur during debugging. This situation is caused by overlapping of the occurrence time of two monitors, which is rare. So it feels like you just need to avoid being empty when the foreach executes🤔(The current thinking is this) @tomsun28
bf1451198103d2ea5a9245282971841
073ba2ecc6a4b0df9df96e6f3927962
839b93394ca570da2deb0bb56e35318
36089539e42e80ec3facb8269d7f52a
99ee3527713df282731fb5f8ea0e450

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging this pull request may close these issues.

4 participants