Author: cziegeler
Date: Thu Mar 22 16:00:28 2012
New Revision: 1303859
URL: http://svn.apache.org/viewvc?rev=1303859&view=rev
Log:
SLING-2444 : Support configurations with old pid
Modified:
sling/trunk/installer/providers/jcr/src/main/java/org/apache/sling/installer/provider/jcr/impl/JcrInstaller.java
Modified:
sling/trunk/installer/providers/jcr/src/main/java/org/apache/sling/installer/provider/jcr/impl/JcrInstaller.java
URL:
http://svn.apache.org/viewvc/sling/trunk/installer/providers/jcr/src/main/java/org/apache/sling/installer/provider/jcr/impl/JcrInstaller.java?rev=1303859&r1=1303858&r2=1303859&view=diff
==============================================================================
---
sling/trunk/installer/providers/jcr/src/main/java/org/apache/sling/installer/provider/jcr/impl/JcrInstaller.java
(original)
+++
sling/trunk/installer/providers/jcr/src/main/java/org/apache/sling/installer/provider/jcr/impl/JcrInstaller.java
Thu Mar 22 16:00:28 2012
@@ -410,6 +410,11 @@ public class JcrInstaller implements Eve
Object result = null;
if ( oldConfig != null ) {
result = oldConfig.get(name);
+ if ( result != null ) {
+ logger.warn("Using configuration value from obsolete
configuration with PID {} for property {}." +
+ " Please merge this configuration into the
configuration with the PID {}.",
+ new Object[] {OLD_PID, name,
this.componentContext.getProperties().get(Constants.SERVICE_PID)});
+ }
}
if ( result == null ) {
result =
this.componentContext.getBundleContext().getProperty(name);