Affects Version/s: 7.2.X, Master
When symbolic link is enabled on a bundle, OSGI config database entries are getting duplicated.
Steps to reproduce:
1. Create a symbolic link to your root folder of Liferay (ln -s liferay-dxp-7.2.10-ga1 live)
2. Change liferay.home in portal-ext.properties to put home Liferay folder with /live (and not the real path)
3. Start Liferay
4. Check Configuration_ table in the database
5. Stop and start Liferay again
6. Check the Configuration_ table again
Expected result: the number of rows in the Configuration_ table remains unchanged
Actual result: each entry gets inserted again
When liferay.home is a symbolic link, in modules/third-party/org-apache-felix-fileinstall/src/main/java/org/apache/felix/fileinstall/internal/ConfigInstaller.java the props of the configuration will be null, thus config.update(ht) will be called at every portal startup.
On the other hand, when liferay.home is a proper file, props is properly initialized by the time the portal is started a second time.
The reason behind this is that in ConfigurationPersistenceManager._verifyDictionary() the path of configFile will contain the symbolic link and it will not be detected, that the configuration has been saved previously. The link should be resolved to the actual file.