"scott.stark(a)jboss.org" wrote :
| The latest jboss-managed 2.1.0.CR6 simply maps MetaValues with null values onto the
corresponding primitive unintialized value when the MetaValue is unwrapped, so essentially
there is no way a primitive will have a null value. I view this as akin to auto promotion
of nulls so that one does not have to track whether a property is a primitive.
|
I think this is fine, as long as we can support the following scenarios:
a) ManagedProperty wraps an int and the user does not want to give it a value (i.e.
he's happy with whatever value the server default is e.g. 0, 20, 100).
The user sets unset=true in the console and then the plugin calls
property.setRemoved(true).
b) ManagedProperty wraps an int and the user specifies no value.
The user sets unset=false in the console, but leaves the value blank. The plugin will do
property.setValue(null) and PS will initialize the underlying value to 0, which is the
value the console will see next time it queries the PS.
I see this as just the fallout from using int's in a components' managed api, if
the component developer wants to support letting the user specify null, then they should
use an Integer.
Cheers
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4223076#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...