FELIX-2298 : Component annotation: getConfigurationFactory should be named configurationFactory
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@936755 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/scrplugin/pom.xml b/scrplugin/pom.xml
index 78a120f..6c5bacc 100644
--- a/scrplugin/pom.xml
+++ b/scrplugin/pom.xml
@@ -67,7 +67,7 @@
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.scr.annotations</artifactId>
- <version>1.2.0</version>
+ <version>1.3.0-SNAPSHOT</version>
</dependency>
<!-- Sling Servlet SCR Annotation -->
diff --git a/scrplugin/src/main/java/org/apache/felix/scrplugin/tags/annotation/defaulttag/ComponentTag.java b/scrplugin/src/main/java/org/apache/felix/scrplugin/tags/annotation/defaulttag/ComponentTag.java
index a36c63a..40c979d 100644
--- a/scrplugin/src/main/java/org/apache/felix/scrplugin/tags/annotation/defaulttag/ComponentTag.java
+++ b/scrplugin/src/main/java/org/apache/felix/scrplugin/tags/annotation/defaulttag/ComponentTag.java
@@ -99,6 +99,14 @@
return Util.getBooleanValue(annotation, "getConfigurationFactory", Component.class);
}
+ public boolean configurationFactory() {
+ final Object obj = annotation.getNamedParameter("configurationFactory");
+ if ( obj != null ) {
+ return Boolean.valueOf(obj.toString());
+ }
+ return getConfigurationFactory();
+ }
+
public Class<? extends java.lang.annotation.Annotation> annotationType() {
return null;
}
@@ -119,7 +127,7 @@
map.put(Constants.COMPONENT_DESCRIPTION, emptyToNull(this.annotation.description()));
map.put(Constants.COMPONENT_ENABLED, String.valueOf(this.annotation.enabled()));
map.put(Constants.COMPONENT_FACTORY, emptyToNull(this.annotation.factory()));
- map.put(Constants.COMPONENT_SET_METATYPE_FACTORY_PID, String.valueOf(this.annotation.getConfigurationFactory()));
+ map.put(Constants.COMPONENT_SET_METATYPE_FACTORY_PID, String.valueOf(this.annotation.configurationFactory()));
// FELIX-593: immediate attribute does not default to true all the
// times hence we only set it if declared in the tag