bndtools/bnd — Issue #122: configuration should return null for nonprimitive properties if not defined
Author: zdila
Created: 2011-12-19 16:21:00+00:00
State: open

Configuration should return null for nonprimitive properties if not defined. Now it returns 0.

Testcase:

@OCD
interface Config {
@AD(required = false)
Integer port();
}

Config config = Configurable.createConfigurable(Config.class, properties);
assert config.port() == null; // property port is not set

Fix:
Please delete "|| Number.class.isAssignableFrom(method.getReturnType())" from aQute/bnd/annotation/metatype/Configurable.java