Hi Christophe,

in JavaBeans (following by Blueprint), a setter is void, and a getter doesn't have argument.
So it should be:

public void setMaxValue(float maxValue) {
   this.maxValue=maxValue;
}
public float getMaxValue() {
   return this.maxValue;
}

Regards
JB

On 06/23/2014 05:34 PM, Lasserre Christophe wrote:
Hello,

I wrote a builder containing the following setter which does not return
void (see following sample).

     /**

      * @param maxValue

      *            Maximal value for compression law attributes

      * @return the builder.

      */

     public CompressionLawBuilder setMaxValue(final float maxValue) {

         this.maxValue = maxValue;

         return this;

}

When I try to create the builder via blueprint, the runtime returns me
the following error message;            “Caused by:
org.osgi.service.blueprint.container.ComponentDefinitionException: No
setter for maxValue property”

If I change the setter and make it return void, everything works
perfectly, so is it normal that the return type of the setter has an
impact on the application behavior ?

Chris.

[@@ OPEN @@]


--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com

Reply via email to