Hello,
i think there is a bug in the handling of invalid rights value of the
JMXProperty annotation.
Example:
@JMXProperty(rights="rw")
This triggers a null point exception as the isRightsValid returns false and
then the setFields method is called with the value that should be written to
the rights attribute.
This is a untested patch for the bug:
Index:
handler/jmx/src/main/java/org/apache/felix/ipojo/handlers/jmx/PropertyField.java
===================================================================
---
handler/jmx/src/main/java/org/apache/felix/ipojo/handlers/jmx/PropertyField.java
(revision 1437622)
+++
handler/jmx/src/main/java/org/apache/felix/ipojo/handlers/jmx/PropertyField.java
(working copy)
@@ -66,7 +66,7 @@
if (isRightsValid(rights)) {
this.setRights(rights);
} else {
- this.setField("r"); // default rights is read only
+ this.setRights("r"); // default rights is read only
}
}
Kind Regards
Richard Kaufhold