mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-05 16:15:54 +00:00
remove wasteful duplicate method calls
This commit is contained in:
1 parent
5abb484957
commit
5571e430d1
3 files changed
+9
-6
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user