The below is the generated code for one of my components:
public CoreModule_ProvideUpdateCheckerFactory(
Provider<Settings> aSettingsProvider,
Provider<UpdateChecker.UpdateCallback> aUpdateCallbackProvider,
Provider<String> aVersionProvider) {
assert aSettingsProvider != null;
this.aSettingsProvider = aSettingsProvider;
assert aUpdateCallbackProvider != null;
this.aUpdateCallbackProvider = aUpdateCallbackProvider;
assert aVersionProvider != null;
this.aVersionProvider = aVersionProvider;
}
This occurs for just about all generated code.
This code causes a warning for each of the parameters to the tune of:
The parameter SettingsProvider is hiding a field from type CoreModule_ProvideUpdateCheckerFactory
This is caused by the formal parameter having the same name as the field in the class. The code works correctly thanks to qualification using this.. Could the code generation be change to set a prefix or suffix or something on the formal arguments to avoid this warning?
Warning for variable shadowing is default in Eclipse AFAICT.
Dagger version 2.10, Java 8.
The below is the generated code for one of my components:
This occurs for just about all generated code.
This code causes a warning for each of the parameters to the tune of:
This is caused by the formal parameter having the same name as the field in the class. The code works correctly thanks to qualification using
this.. Could the code generation be change to set a prefix or suffix or something on the formal arguments to avoid this warning?Warning for variable shadowing is default in Eclipse AFAICT.
Dagger version 2.10, Java 8.