PMD: Enable UnnecessaryWrapperObjectCreation
This commit is contained in:
parent
7a8151753b
commit
65e2931fe8
@ -372,7 +372,9 @@ public final class LocalRepoManager {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
|
||||
// max age is an EditTextPreference, which is always a String
|
||||
int repoMaxAge = Float.valueOf(prefs.getString("max_repo_age_days", DEFAULT_REPO_MAX_AGE_DAYS)).intValue();
|
||||
// TODO: This pref is probably never being set. Also, why
|
||||
// are we mixing floats and ints?
|
||||
int repoMaxAge = Float.valueOf(prefs.getString("max_repo_age_days", DEFAULT_REPO_MAX_AGE_DAYS)).intValue(); // NOPMD
|
||||
|
||||
serializer.startTag("", "repo");
|
||||
|
||||
|
@ -20,6 +20,7 @@
|
||||
<rule ref="rulesets/java/optimizations.xml/PrematureDeclaration"/>
|
||||
<rule ref="rulesets/java/optimizations.xml/AddEmptyString"/>
|
||||
<rule ref="rulesets/java/optimizations.xml/UseArraysAsList"/>
|
||||
<rule ref="rulesets/java/optimizations.xml/UnnecessaryWrapperObjectCreation"/>
|
||||
|
||||
<rule ref="rulesets/java/controversial.xml/UnnecessaryConstructor"/>
|
||||
<rule ref="rulesets/java/controversial.xml/UnnecessaryParentheses"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user