currently this code is generated:
if (cast == null) {
cast = CastManager_.getInstance_(this);
}
// nonConfigurationInstance = ...
if (nonConfigurationInstance != null) {
cast = nonConfigurationInstance.cast;
((CastManager_) cast).rebind(this);
}
it would make more sense to change the order as for a fresh activity fields are null (if not otherwise assigned) by default.
// nonConfigurationInstance = ...
if (nonConfigurationInstance != null) {
cast = nonConfigurationInstance.cast;
((CastManager_) cast).rebind(this);
}
if (cast == null) {
cast = CastManager_.getInstance_(this);
}