excilys/androidannotations — Issue #2: @Enhanced warning : The value of the local variable activity is not used
Author: pyricau
Created: 2012-01-06 09:53:37+00:00
State: open
Labels: Defect

When using @Enhanced on a component without anything that requires init, the following code is generated :

private void init_() {
if (context_ instanceof Activity) {
Activity activity = ((Activity) context_);
}
}

This generates a warning : The value of the local variable activity is not used

This part of the code should only be added when needed.