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

Enabled support for mBeans with non-string typed keys #152

Merged
merged 1 commit into from
Feb 3, 2021

Conversation

endoplasmicR
Copy link
Contributor

No description provided.

if (key == null) {
// Get for all keys
for (Map.Entry<String, Object> entry : mapData.entrySet()) {
String key = entry.getKey();
for (Map.Entry<Object, Object> entry : mapData.entrySet()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of a specific one-off to support doubles, could we instead just toString the key before adding/getting and keep the key as a String? That seems cleaner and would work for other types.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I believe this already supports all types since Java Objects must implement toString(). (Double is just an example type covered in tests)

Copy link
Contributor

Choose a reason for hiding this comment

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

ic. we're just casting the mbean map type more generically. I initially thought this change was being exposed more so than it is. My bad.

@cyrille-leclerc cyrille-leclerc merged commit 80f5805 into jmxtrans:master Feb 3, 2021
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.

3 participants