[JMX-7] Extend Destract protocol on nil to handle Null references gracefully Created: 23/Aug/12 Updated: 18/Sep/12 Resolved: 18/Sep/12 |
|
| Status: | Resolved |
| Project: | java.jmx |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Defect | Priority: | Major |
| Reporter: | Jürgen Hötzel | Assignee: | Unassigned |
| Resolution: | Completed | Votes: | 0 |
| Labels: | bug | ||
| Attachments: |
|
| Patch: | Fixed |
| Approval: | Accepted |
| Description |
|
JMX Attributes can have null references. Currently a Exception is thrown because the "null-type" is not handled via objects->data: user> (jmx/mbean "java.lang:type=GarbageCollector,name=PS MarkSweep") After applying this patch: user> (jmx/mbean "java.lang:type=GarbageCollector,name=PS MarkSweep") |
| Comments |
| Comment by Nick Bailey [ 31/Aug/12 4:42 PM ] |
|
I don't suppose you know of a standard mbean that ships with most jvms we could use to write a test case for this? |
| Comment by Jürgen Hötzel [ 10/Sep/12 9:21 AM ] |
|
I don't know of a standard MBean attribute which is reproducible Null. "LastGcInfo" of "java.lang:type=GarbageCollector,name=PS MarkSweep" is non-Null after a garbage collection. I think its better to test the Destract protocol directly instead of using a "live" MBean in this case. BTW. there was also a duplicate definition of the existing Destract tests in test-objects->data. Patches enclosed. |
| Comment by Nick Bailey [ 18/Sep/12 11:20 PM ] |
|
Committed: https://github.com/clojure/java.jmx/commit/31b58b9c78baa9f6f31a51cd6e8b8b729af4622a |