dotCMS/dotCMS — pull request #2039 by signed8bit (2013-02-08 22:56:12+00:00)
Title: PluginFileMerger support for multi-line property values

I ran into an issue today when adding new packages to the *felix.org.osgi.framework.system.packages.extra* property from a static config plugin. I discovered that the PluginFileMerger class was not handling multi-line property values properly. Here is how an overridden block looks before my changes. Note, this is intentional condensed.

## FELIX CONFIGURATION
## OVERRIDE:com.mypackage.config
#felix.org.osgi.framework.system.packages.extra=\
com.dotmarketing.business.web,\
com.dotmarketing.business,\
com.dotcms.spring.web,\
javax.servlet.resources,\
## OVERRIDE:com.mypackage.config
#javax.servlet;javax.servlet.http;version=2.5

This has the result of causing the OSGi Framework not to start. Most likely due to the dangling '\' character? This pull request adds support for multi-line property values to the PluginFileMerger. After these changes, the above block is instead output as follows.

## FELIX CONFIGURATION
## OVERRIDE:com.mypackage.config
#felix.org.osgi.framework.system.packages.extra=\
#com.dotmarketing.business.web,\
#com.dotmarketing.business,\
#com.dotcms.spring.web,\
#javax.servlet.resources,\
#javax.servlet;javax.servlet.http;version=2.5

I tried to retain a similar code style and to only change the bare minimum. I didn't see any unit tests for this class so my testing is pretty limited. I only really verified my specific use case with the *felix.org.osgi.framework.system.packages.extra*. So, I may have missed something obvious to you all.