Very strange what my question still has no answers. I'll try to be more clear:
ServerRuntime runtime = ...;
ObjectContext ctx = runtime.getContext();
ctx.setUserProperty("my-property", "value");
ctx.setUserProperty("my-property", null); // throws NPE and no another
way to delete property.
/// Workaround:
// Define global constant: public static final Object EMPTY_VALUE = new
Object();
// Clear property:
ctx.setUserProperty("my-property", EMPTY_VALUE);
// Check if empty:
if (EMPTY_VALUE.equals(ctx.getUserProperty("my-property"))) {
// ...
}
// Should have in API anything like:
ctx.removeUserProperty("my-property");
May be should I ask this question to devel group?
Thanks,
Alexey Katorgin.