mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-17 14:02:22 +00:00
Slave is not serializable.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@3318 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
9f147cf6bd
commit
0cee864dc2
1 file changed
+17
-14
@@ -315,15 +315,7 @@ public final class Slave implements Node, Serializable {
|
||||
}
|
||||
|
||||
// install log handler
|
||||
channel.call(new Callable<Void,RuntimeException>() {
|
||||
public Void call() {
|
||||
// avoid double installation of the handler
|
||||
Logger logger = Logger.getLogger("hudson");
|
||||
logger.removeHandler(SLAVE_LOG_HANDLER);
|
||||
logger.addHandler(SLAVE_LOG_HANDLER);
|
||||
return null;
|
||||
}
|
||||
});
|
||||
channel.call(new LogInstaller());
|
||||
|
||||
|
||||
// prevent others from seeing a channel that's not properly initialized yet
|
||||
@@ -482,6 +474,22 @@ public final class Slave implements Node, Serializable {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* This field is used on each slave node to record log records on the slave.
|
||||
*/
|
||||
private static final RingBufferLogHandler SLAVE_LOG_HANDLER = new RingBufferLogHandler();
|
||||
|
||||
private static class LogInstaller implements Callable<Void,RuntimeException> {
|
||||
public Void call() {
|
||||
// avoid double installation of the handler
|
||||
Logger logger = Logger.getLogger("hudson");
|
||||
logger.removeHandler(SLAVE_LOG_HANDLER);
|
||||
logger.addHandler(SLAVE_LOG_HANDLER);
|
||||
return null;
|
||||
}
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
|
||||
//
|
||||
// backwrad compatibility
|
||||
//
|
||||
@@ -501,9 +509,4 @@ public final class Slave implements Node, Serializable {
|
||||
* @deprecated
|
||||
*/
|
||||
private transient String command;
|
||||
|
||||
/**
|
||||
* This field is used on each slave node to record log records on the slave.
|
||||
*/
|
||||
private static final RingBufferLogHandler SLAVE_LOG_HANDLER = new RingBufferLogHandler();
|
||||
}
|
||||
Reference in new issue
Block a user