Affects Version/s: 6.2.X EE, 7.0.0 M3
Component/s: Core Infrastructure
If a null value is set to the preferences, the default value is not used.
According to the specification, "A null value is treated as a non-existent value", thus the default value should be used.
This behavior causes problem during the import process, when the preferences are copied. When there is no value for a key, a null value is copied to the preferences. Querying this value ignores the default value, and returns null, which leads to NullPointerExceptions.
Possible reproduction steps:
1. Create a Site Template
2. Add an RSS portlet to a page, configure it, delete all of the displayed feeds.
3. Create a Site from the template
4. Go to the page with the RSS portlet, modify something the page.
5. At the top of the page, a message is displayed: "This page has been changed since the last update from the site template. "
6. Reset the changes
7. Refresh the page
Result: NullPointerException in the logs.