remove wasteful duplicate method calls

This commit is contained in:
Dave Brosius committed 2011-02-05 19:16:24 -05:00
1 parent 5abb484957
commit 5571e430d1
3 files changed
+9 -6

No files matched your search

+3 -2
View File
@@ -485,9 +485,10 @@ public class PluginWrapper implements Comparable<PluginWrapper> {
* or null if there's no back up.
*/
public String getBackupVersion() {
if (getBackupFile().exists()) {
File backup = getBackupFile();
if (backup.exists()) {
try {
JarFile backupPlugin = new JarFile(getBackupFile());
JarFile backupPlugin = new JarFile(backup);
return backupPlugin.getManifest().getMainAttributes().getValue("Plugin-Version");
} catch (IOException e) {
LOGGER.log(WARNING, "Failed to get backup version ", e);