◐ Shell
clean mode source ↗

DefaultModuleService: change persisting of items by stelfrich · Pull Request #236 · scijava/scijava-common

Disable the persisting of a ModuleItems if an initialize() method is set
and is not empty. This way, initialize() can overwrite the value of a
ModuleItem even if persist=true is assumed implicitly.

See:
* imagej/imagej-legacy#137 (comment)
Introduces the ItemPersistence enum (YES, NO, DEFAULT). YES and NO
overwrite additional checks (i.e. precedence of an initializer, value
is default value). In case of DEFAULT, the value is persisted only if
it is not the default value and no initializer is set.