提交 2f263e4a 编写于 作者: M mindless

catch NumberFormatException in isForNewerHudson, and better support for dev builds

(trim "(private....)" portion so VersionNumber accurately handles SNAPSHOT build)


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@25539 71c3de6d-444a-0410-be80-ed276b4c234a
上级 da3e72bb
......@@ -558,7 +558,12 @@ public class UpdateSite {
}
public boolean isForNewerHudson() {
return requiredCore!=null && new VersionNumber(requiredCore).isNewerThan(new VersionNumber(Hudson.VERSION));
try {
return requiredCore!=null && new VersionNumber(requiredCore).isNewerThan(
new VersionNumber(Hudson.VERSION.replaceFirst("SHOT *\(private.*\)", "SHOT")));
} catch (NumberFormatException nfe) {
return true; // If unable to parse version
}
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册