FELIX-3481 - Targeted PID support:
- bindsStronger applies wrong logic thus resulting in
false negatives
- provideReplacement reassigns the deleted configuration
instead of the replacement configuration
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1357744 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/configadmin/src/main/java/org/apache/felix/cm/impl/ConfigurationManager.java b/configadmin/src/main/java/org/apache/felix/cm/impl/ConfigurationManager.java
index 38afd65..33d6eb4 100644
--- a/configadmin/src/main/java/org/apache/felix/cm/impl/ConfigurationManager.java
+++ b/configadmin/src/main/java/org/apache/felix/cm/impl/ConfigurationManager.java
@@ -510,7 +510,7 @@
for ( String candidate : names )
{
ConfigurationImpl config = getConfiguration( candidate );
- if ( config != null )
+ if ( config != null && !config.isDeleted() )
{
// check visibility to use and dynamically bind
if ( canReceive( serviceBundle, config.getBundleLocation() ) )
@@ -1612,14 +1612,14 @@
final TargetedPID configPid;
final Dictionary properties;
final long revision;
- synchronized ( config )
+ synchronized ( rc )
{
- configPid = config.getPid();
- properties = config.getProperties( true );
- revision = config.getRevision();
+ configPid = rc.getPid();
+ properties = rc.getProperties( true );
+ revision = rc.getRevision();
}
- helper.provideConfiguration( sr, configPid, null, properties, revision );
+ helper.provideConfiguration( sr, configPid, null, properties, -revision );
return true;
}