You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by cz...@apache.org on 2013/07/17 14:51:23 UTC
svn commit: r1504107 - in /felix/trunk/scrplugin/generator: changelog.txt
src/main/java/org/apache/felix/scrplugin/SCRDescriptorGenerator.java
Author: cziegeler
Date: Wed Jul 17 12:51:23 2013
New Revision: 1504107
URL: http://svn.apache.org/r1504107
Log:
FELIX-4170 : Deprecate inheritance of component descriptors
Modified:
felix/trunk/scrplugin/generator/changelog.txt
felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/SCRDescriptorGenerator.java
Modified: felix/trunk/scrplugin/generator/changelog.txt
URL: http://svn.apache.org/viewvc/felix/trunk/scrplugin/generator/changelog.txt?rev=1504107&r1=1504106&r2=1504107&view=diff
==============================================================================
--- felix/trunk/scrplugin/generator/changelog.txt (original)
+++ felix/trunk/scrplugin/generator/changelog.txt Wed Jul 17 12:51:23 2013
@@ -3,7 +3,8 @@ Changes from 1.8.0 to 1.7.0
** Improvement
* [FELIX-4101] - Create metatype.properties file when description and label are inlined
* [FELIX-4126] - Discontinue creation of single XML descriptor files
-
+ * [FELIX-4170] - Deprecate inheritance of component descriptors
+
Changes from 1.7.0 to 1.6.0
---------------------------
Modified: felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/SCRDescriptorGenerator.java
URL: http://svn.apache.org/viewvc/felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/SCRDescriptorGenerator.java?rev=1504107&r1=1504106&r2=1504107&view=diff
==============================================================================
--- felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/SCRDescriptorGenerator.java (original)
+++ felix/trunk/scrplugin/generator/src/main/java/org/apache/felix/scrplugin/SCRDescriptorGenerator.java Wed Jul 17 12:51:23 2013
@@ -279,6 +279,7 @@ public class SCRDescriptorGenerator {
}
}
}
+
/**
* Create the SCR objects based on the descriptions
*/
@@ -344,6 +345,12 @@ public class SCRDescriptorGenerator {
inherit = (cd == null ? true : cd.isInherit());
if ( cd != null ) {
+ if ( current != desc ) {
+ iLog.addWarning(" Component " + componentDesc.getName() + " is using the " +
+ "deprecated inheritance feature and inherits from " + current.getDescribedClass().getName() +
+ ". This feature will be removed in future versions.",
+ desc.getSource());
+ }
// handle enabled and immediate
if ( componentDesc.getEnabled() == null ) {
componentDesc.setEnabled(cd.getEnabled());
@@ -370,12 +377,13 @@ public class SCRDescriptorGenerator {
// policy requires 1.1
componentDesc.setSpecVersion(SpecVersion.VERSION_1_1);
}
+
+ // services, properties, references
+ this.processServices(current, container);
+ this.processProperties(current, container, ocd);
+ this.processReferences(current, container);
}
- // services, properties, references
- this.processServices(current, container);
- this.processProperties(current, container, ocd);
- this.processReferences(current, container);
// go up in the class hierarchy
if ( !inherit || current.getDescribedClass().getSuperclass() == null ) {