You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Michiel Vermandel <mv...@yahoo.com> on 2013/05/19 10:32:07 UTC

[IPOJO] onGet passes null as pojoObject?

Hi,

I am using ipojo 1.8.6.

I had written a handler and registered a field in the configure method.
When the field was accessed, the onGet method of my handler is called, but the pojo parameter was empty (null).
After invesigating the source code of ipojo, I found this:

InstanceManager.java:
line 1114:
Object handlerResult = list[i].onGet(null, fieldName, initialValue);

Why is null passed and not the pojo object? 

How can I get the actual pojo object of the field?

Thanks

-----------------
http://www.codessentials.com - Your essential software, for free!
Follow us at http://twitter.com/#!/Codessentials

Re: [IPOJO] onGet passes null as pojoObject?

Posted by Michiel Vermandel <mv...@yahoo.com>.
Thank you!


 
-----------------
http://www.codessentials.com - Your essential software, for free!
Follow us at http://twitter.com/#!/Codessentials


________________________________
 From: Clement Escoffier <cl...@gmail.com>
To: users@felix.apache.org; Michiel Vermandel <mv...@yahoo.com> 
Sent: Tuesday, May 21, 2013 10:59 AM
Subject: Re: [IPOJO] onGet passes null as pojoObject?
 

Hi,

I've fixed it in the trunk: https://issues.apache.org/jira/browse/FELIX-4072

Clement

On 19 mai 2013, at 10:40, Clement Escoffier <cl...@gmail.com> wrote:

> Hi,
> 
> it's definitely a bug. It looks like onGet and onSet are not giving the pojo object to the interceptors. Can you open an issue ?
> 
> For the time being you can use the org.apache.felix.ipojo.InstanceManager#getPojoObject method to retrieve the Object.
> 
> Regards,
> 
> Clement
> 
> On 19 mai 2013, at 10:32, Michiel Vermandel <mv...@yahoo.com> wrote:
> 
>> Hi,
>> 
>> I am using ipojo 1.8.6.
>> 
>> I had written a handler and registered a field in the configure method.
>> When the field was accessed, the onGet method of my handler is called, but the pojo parameter was empty (null).
>> After invesigating the source code of ipojo, I found this:
>> 
>> InstanceManager.java:
>> line 1114:
>> Object handlerResult = list[i].onGet(null, fieldName, initialValue);
>> 
>> Why is null passed and not the pojo object? 
>> 
>> How can I get the actual pojo object of the field?
>> 
>> Thanks
>> 
>> -----------------
>> http://www.codessentials.com - Your essential software, for free!
>> Follow us at http://twitter.com/#!/Codessentials
> 

Re: [IPOJO] onGet passes null as pojoObject?

Posted by Clement Escoffier <cl...@gmail.com>.
Hi,

I've fixed it in the trunk: https://issues.apache.org/jira/browse/FELIX-4072

Clement

On 19 mai 2013, at 10:40, Clement Escoffier <cl...@gmail.com> wrote:

> Hi,
> 
> it's definitely a bug. It looks like onGet and onSet are not giving the pojo object to the interceptors. Can you open an issue ?
> 
> For the time being you can use the org.apache.felix.ipojo.InstanceManager#getPojoObject method to retrieve the Object.
> 
> Regards,
> 
> Clement
> 
> On 19 mai 2013, at 10:32, Michiel Vermandel <mv...@yahoo.com> wrote:
> 
>> Hi,
>> 
>> I am using ipojo 1.8.6.
>> 
>> I had written a handler and registered a field in the configure method.
>> When the field was accessed, the onGet method of my handler is called, but the pojo parameter was empty (null).
>> After invesigating the source code of ipojo, I found this:
>> 
>> InstanceManager.java:
>> line 1114:
>> Object handlerResult = list[i].onGet(null, fieldName, initialValue);
>> 
>> Why is null passed and not the pojo object? 
>> 
>> How can I get the actual pojo object of the field?
>> 
>> Thanks
>> 
>> -----------------
>> http://www.codessentials.com - Your essential software, for free!
>> Follow us at http://twitter.com/#!/Codessentials
> 


Re: [IPOJO] onGet passes null as pojoObject?

Posted by Clement Escoffier <cl...@gmail.com>.
Hi,

it's definitely a bug. It looks like onGet and onSet are not giving the pojo object to the interceptors. Can you open an issue ?

For the time being you can use the org.apache.felix.ipojo.InstanceManager#getPojoObject method to retrieve the Object.

Regards,

Clement

On 19 mai 2013, at 10:32, Michiel Vermandel <mv...@yahoo.com> wrote:

> Hi,
> 
> I am using ipojo 1.8.6.
> 
> I had written a handler and registered a field in the configure method.
> When the field was accessed, the onGet method of my handler is called, but the pojo parameter was empty (null).
> After invesigating the source code of ipojo, I found this:
> 
> InstanceManager.java:
> line 1114:
> Object handlerResult = list[i].onGet(null, fieldName, initialValue);
> 
> Why is null passed and not the pojo object? 
> 
> How can I get the actual pojo object of the field?
> 
> Thanks
> 
> -----------------
> http://www.codessentials.com - Your essential software, for free!
> Follow us at http://twitter.com/#!/Codessentials


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org