I've not seen a JMX console that allows null vs empty strings to be distinguished. I therefore uniformly convert from one to the other in all MBean String setters. Except where leading or trailing whitespace is of potential interest I also trim the string first lest a user accidentally hit the spacebar and get a different result.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is it possible to set a null value to a string attribute instead of the empty string ?
Not given the current interface, but a good idea for the future.
I've not seen a JMX console that allows null vs empty strings to be distinguished. I therefore uniformly convert from one to the other in all MBean String setters. Except where leading or trailing whitespace is of potential interest I also trim the string first lest a user accidentally hit the spacebar and get a different result.