mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-15 13:02:19 +00:00
Switched from annotation based scheme to a function based scheme.
This commit is contained in:
1 parent
59456c734a
commit
ffb5b65093
44 files changed
+247
-251
No files matched your search
@@ -31,6 +31,8 @@ import hudson.util.ProcessTree;
|
||||
import hudson.util.StreamTaskListener;
|
||||
import hudson.remoting.Callable;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
|
||||
import jenkins.security.MasterToSlaveCallable;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.jvnet.hudson.test.Bug;
|
||||
|
||||
@@ -74,7 +76,7 @@ public class LauncherTest extends ChannelTestCase {
|
||||
}
|
||||
}
|
||||
|
||||
private static final Callable<Object,RuntimeException> NOOP = new Callable<Object,RuntimeException>() {
|
||||
private static final Callable<Object,RuntimeException> NOOP = new MasterToSlaveCallable<Object,RuntimeException>() {
|
||||
public Object call() throws RuntimeException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package hudson.os;
|
||||
|
||||
import hudson.remoting.Callable;
|
||||
import hudson.util.StreamTaskListener;
|
||||
import jenkins.security.MasterToSlaveCallable;
|
||||
|
||||
import java.io.FileOutputStream;
|
||||
|
||||
@@ -10,7 +11,7 @@ import java.io.FileOutputStream;
|
||||
*/
|
||||
public class SUTester {
|
||||
public static void main(String[] args) throws Throwable {
|
||||
SU.execute(StreamTaskListener.fromStdout(),"kohsuke","bogus",new Callable<Object, Throwable>() {
|
||||
SU.execute(StreamTaskListener.fromStdout(),"kohsuke","bogus",new MasterToSlaveCallable<Object, Throwable>() {
|
||||
public Object call() throws Throwable {
|
||||
System.out.println("Touching /tmp/x");
|
||||
new FileOutputStream("/tmp/x").close();
|
||||
|
||||
@@ -5,6 +5,7 @@ import hudson.remoting.Callable;
|
||||
import hudson.remoting.VirtualChannel;
|
||||
import hudson.util.ProcessTree.OSProcess;
|
||||
import hudson.util.ProcessTree.ProcessCallable;
|
||||
import jenkins.security.MasterToSlaveCallable;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.Serializable;
|
||||
@@ -35,7 +36,7 @@ public class ProcessTreeTest extends ChannelTestCase {
|
||||
t.p.act(new ProcessCallableImpl());
|
||||
}
|
||||
|
||||
private static class MyCallable implements Callable<Tag, IOException>, Serializable {
|
||||
private static class MyCallable extends MasterToSlaveCallable<Tag, IOException> implements Serializable {
|
||||
public Tag call() throws IOException {
|
||||
Tag t = new Tag();
|
||||
t.tree = ProcessTree.get();
|
||||
|
||||
Reference in new issue
Block a user