提交 d1e51821 编写于 作者: K kohsuke

[FIXED HUDSON-1696] applied a patch. Be more lenient in comparing a version. Fixed in 1.216.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@9334 71c3de6d-444a-0410-be80-ed276b4c234a
上级 4645b8de
......@@ -332,13 +332,19 @@ public class ChangeLogTask extends AbstractCvsTask {
long version = 0;
while (mySt.hasMoreTokens()) {
String s = mySt.nextToken();
int i = 0;
for (i = 0; i < s.length(); i++) {
int startpos;
// find the first digit char
for (startpos = 0; startpos < s.length(); startpos++)
if (Character.isDigit(s.charAt(startpos)))
break;
// ... and up to the end of this digit set
int i;
for (i = startpos; i < s.length(); i++) {
if (!Character.isDigit(s.charAt(i))) {
break;
}
}
String s2 = s.substring(0, i);
String s2 = s.substring(startpos, i);
version = version + counter * Long.parseLong(s2);
if (counter == 1) {
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册