SimplePDPConfiguration.TimeZone not properly working in OSGi-blueprint

Description

The getter and setter for the TimeZone in the SimplePDPConfiguration leads to problems in an OSGi-blueprint environment, when the timeZone shall be set in blueprint.

blueprint.xml
<bean id="simplePdpConfiguration" class="org.herasaf.xacml.core.simplePDP.SimplePDPConfiguration">
<property name="timeZone" value="Europe/Zurich" />
</bean>

error on bundle-start
Caused by: org.osgi.service.blueprint.container.ComponentDefinitionException: Error setting property: PropertyDescriptor <name: timeZone, getter: class org.
herasaf.xacml.core.simplePDP.SimplePDPConfiguration.getTimeZone(), setter: [class org.herasaf.xacml.core.simplePDP.SimplePDPConfiguration.setTimeZone(class java.lang.String)]
at org.apache.aries.blueprint.container.BeanRecipe.setProperty(BeanRecipe.java:939)[23:org.apache.aries.blueprint.core:1.4.4]
at org.apache.aries.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:905)[23:org.apache.aries.blueprint.core:1.4.4]
at org.apache.aries.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:886)[23:org.apache.aries.blueprint.core:1.4.4]
at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:820)[23:org.apache.aries.blueprint.core:1.4.4]
at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)[23:org.apache.aries.blueprint.core:1.4.4]
at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[23:org.apache.aries.blueprint.core:1.4.4]
at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_45]
at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[23:org.apache.aries.blueprint.core:1.4.4]
at org.apache.aries.blueprint.di.RefRecipe.internalCreate(RefRecipe.java:62)[23:org.apache.aries.blueprint.core:1.4.4]
at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:106)[23:org.apache.aries.blueprint.core:1.4.4]
at org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:268)[23:org.apache.aries.blueprint.core:1.4.4]
at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:806)[23:org.apache.aries.blueprint.core:1.4.4]
at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)[23:org.apache.aries.blueprint.core:1.4.4]
at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[23:org.apache.aries.blueprint.core:1.4.4]
at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_45]
at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[23:org.apache.aries.blueprint.core:1.4.4]
at org.apache.aries.blueprint.di.RefRecipe.internalCreate(RefRecipe.java:62)[23:org.apache.aries.blueprint.core:1.4.4]
at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:106)[23:org.apache.aries.blueprint.core:1.4.4]
at org.apache.aries.blueprint.container.ServiceRecipe.createService(ServiceRecipe.java:285)[23:org.apache.aries.blueprint.core:1.4.4]
... 21 more
Caused by: org.osgi.service.blueprint.container.ComponentDefinitionException: At least one Setter method has to match the type of the Getter method for property timeZone

Problem
Blueprint requires that the parameter of the setter and the return value have the same type.

Environment

None

Activity

Show:
Florian Huonder
March 28, 2016, 12:44 PM

Implementation idea
Change to setter in the SimplePDPConfiguration to take an argument of type DateTimeZone.

For the blueprint-usage
Create the timezone with the provided factory-methods.

Assignee

Unassigned

Reporter

Florian Huonder

Labels

None

Components

Fix versions

Affects versions

Priority

Major
Configure