Hi,
On 28.06.2011, at 12:27, Thomas Calmant wrote:
> Hi,
>
> I've a strange behavior while working on the iPOJO builder for Eclipse :
> when the iPOJO manipulator works on an already manipulated class, it returns
> an empty array.
> I've seen it comes from the method
> "org.apache.felix.ipojo.manipulation.Manipulator.manipulate(byte[])"
> (around line 70), where the test "ck.isalreadyManipulated()" is visible.
>
> Wouldn't be a better behavior to return the original byte array ("origin")
> instead of an empty one ?
I think it's a former convention to determine is the class was manipulated, but
I agree it would be better to return the same array, and use the
isAlreadyManipulated method.
> According to the Pojoization class, the setBytecode() method is called
> without tests, so it may erase the current class file content and imply an
> invalid build state...
I'm not sure, but it should be tested... I will have a look to confirm it.
>
> At least, it may be useful to indicate that behavior in the javadoc.
Will do,
Regards,
Clement
>
> Regards,
> Thomas.