提交 7b7d1269 编写于 作者: K kohsuke

avoid using deprecated methods

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@18914 71c3de6d-444a-0410-be80-ed276b4c234a
上级 a3c0a1c0
......@@ -56,6 +56,9 @@ import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.locks.ReentrantLock;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.text.DateFormat;
import net.sf.json.JSONObject;
/**
* {@link Trigger} that checks for SCM updates periodically.
......@@ -262,7 +265,7 @@ public class SCMTrigger extends Trigger<SCMedItem> {
old.shutdown();
}
public boolean configure(StaplerRequest req) throws FormException {
public boolean configure(StaplerRequest req, JSONObject json) throws FormException {
String t = req.getParameter("poll_scm_threads");
if(t==null || t.length()==0)
setPollingThreadCount(0);
......@@ -272,7 +275,7 @@ public class SCMTrigger extends Trigger<SCMedItem> {
// Save configuration
save();
return super.configure(req);
return true;
}
}
......@@ -378,7 +381,7 @@ public class SCMTrigger extends Trigger<SCMedItem> {
try {
PrintStream logger = listener.getLogger();
long start = System.currentTimeMillis();
logger.println("Started on "+new Date().toLocaleString());
logger.println("Started on "+ DateFormat.getDateTimeInstance().format(new Date()));
boolean result = job.pollSCMChanges(listener);
logger.println("Done. Took "+ Util.getTimeSpanString(System.currentTimeMillis()-start));
if(result)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册