Bug 514333 - Preferences store access can lead to unattended workspace
location initialization

DataArea checks now if "osgi.dataAreaRequiresExplicitInit" system
property is set to "true". In that case it only allows to initialize
location if the location provides a NON-default value (service.isSet()).

If the instance location is not set explicitly and the system property
is enabled, DataArea will throw IllegalStateException on any attempt to
initialize it. If the PreferencesService is the one who triggers the
unattended init of the DataArea, it will also propagate the
IllegalStateException now.

The default behavior if the system property is not set remains
unchanged.

Change-Id: I9cb9a24c876225148620488d9dfaa6579465e982
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
2 files changed