Hello,
I managed to make my pojo appear to be constructor injected like so:
@Component(name = "HelloClient", immediate = true)
public class HelloClient {
@Property
private final int delay;
@Requires
private final Hello[] hello;
private Thread thread;
private boolean running;
@SuppressWarnings("unused")
private HelloClient() {
this(null, 0);
}
public HelloClient(Hello[] hello, int delay) {
this.hello = hello;
this.delay = delay;
}
....
}
From the iPojo documentation on the byte code manipulation it appears to be irrelevant if I have my
fields declared final - they are bypassed at runtime anyway right? Still there seems to be potential
for danger here. The code is compiled against final fields but later on is manipulated to run
against a getter, which can return a different value every time it is called. Can this cause any
nasty surprises?
Cheers,
Todor
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]