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:
kohsuke committed 2008-08-11 23:04:18 +00:00
1 parent 1436bf7798
commit 1e11a2fd39
2 files changed
+21 -10

No files matched your search

+2 -10
View File
@@ -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;
}
/**