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

NPE in com.yammer.metrics.util.Utils:sortMetrics #44

Closed
ghost opened this issue Jun 20, 2011 · 1 comment
Closed

NPE in com.yammer.metrics.util.Utils:sortMetrics #44

ghost opened this issue Jun 20, 2011 · 1 comment

Comments

@ghost
Copy link

ghost commented Jun 20, 2011

As described at http://download.oracle.com/javase/1,5.0/docs/api/java/lang/Class.html#getCanonicalName() the canonical name of an anonymous or local class will be null. This results in an NPE at the call to entry.getKey().getKlass().getCanonicalName().replace etc. This could likely be replaced with a call to getName or getSimpleName

@codahale
Copy link
Contributor

Good catch; thanks for pointing that out. 2.0.0-BETA14-SNAPSHOT has this fix.

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

No branches or pull requests

1 participant