Findbugs all over

- volatile -> atomic
 - unused code and fields
 - closing streams
 - hashCode / equals
 - known non-null
 - Number.valueOf
 - new String
 Still avoiding SAM, BOB, SusiMail
This commit is contained in:
zzz
2013-11-16 13:22:05 +00:00
parent 96cf1d60c2
commit 1d4190734d
30 changed files with 107 additions and 64 deletions

View File

@@ -1104,7 +1104,6 @@ public class ConsoleUpdateManager implements UpdateManager {
case PLUGIN:
Properties props = PluginStarter.pluginProperties(_context, id);
String oldVersion = props.getProperty("version");
String xpi2pURL = props.getProperty("updateURL");
if (xpi2pURL != null) {
try {
@@ -1472,6 +1471,12 @@ public class ConsoleUpdateManager implements UpdateManager {
return VersionComparator.comp(version, r.version);
}
@Override
public int hashCode() { return version.hashCode(); }
@Override
public boolean equals(Object o) { return (o instanceof Version) && version.equals(((Version)o).version); }
@Override
public String toString() {
return "Version " + version;