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

Add a class cast check to avoid ClassCastException #505

Merged
merged 1 commit into from
Oct 7, 2019
Merged

Add a class cast check to avoid ClassCastException #505

merged 1 commit into from
Oct 7, 2019

Conversation

kebuu
Copy link
Contributor

@kebuu kebuu commented Oct 7, 2019

FIX #504
I added the method getGarbageCollectorMXBeans to be able to test my modifications (otherwise I don't know how to fake ManagementFactory.getGarbageCollectorMXBeans()).

FIX #504

Signed-off-by: Christophe TARDELLA <christophe.tardella@gmail.com>
@@ -97,4 +99,8 @@ private static long getAndSet(Map<String, Long> map, String key, long value) {
return last == null ? 0 : last;
}
}

protected List<GarbageCollectorMXBean> getGarbageCollectorMXBeans() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did you add this function?

@kebuu
Copy link
Contributor Author

kebuu commented Oct 7, 2019 via email

@brian-brazil brian-brazil merged commit ba220f7 into prometheus:master Oct 7, 2019
@brian-brazil
Copy link
Contributor

Thanks!

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

Successfully merging this pull request may close these issues.

ClassCastException in MemoryAllocationExports
2 participants