mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-10-28 20:15:22 +00:00
this is more OO.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@11395 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
1436bf7798
commit
1e11a2fd39
2 files changed
+21
-10
No files matched your search
@@ -477,16 +477,8 @@ public final class PluginWrapper {
|
||||
public UpdateCenter.Plugin getUpdateInfo() {
|
||||
UpdateCenter uc = Hudson.getInstance().getUpdateCenter();
|
||||
UpdateCenter.Plugin p = uc.getPlugin(getShortName());
|
||||
if(p==null) return null;
|
||||
|
||||
try {
|
||||
if(new VersionNumber(getVersion()).compareTo(new VersionNumber(p.version)) < 0)
|
||||
return p;
|
||||
return null;
|
||||
} catch (IllegalArgumentException e) {
|
||||
// couldn't parse it as the version number. ignore.
|
||||
return null;
|
||||
}
|
||||
if(p!=null && p.isNewerThan(getVersion())) return p;
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user