mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-10 02:26:18 +00:00
null check to avoid unit test failure
This commit is contained in:
1 parent
51d5220f6c
commit
8b15fb6ae7
1 file changed
+6
-3
@@ -830,9 +830,12 @@ public final class FilePath implements Serializable {
|
||||
// run this on a remote system
|
||||
try {
|
||||
DelegatingCallable<T,IOException> wrapper = new FileCallableWrapper<T>(callable, cl);
|
||||
ExtensionList<FileCallableWrapperFactory> factories = Jenkins.getInstance().getExtensionList(FileCallableWrapperFactory.class);
|
||||
for (FileCallableWrapperFactory factory : factories) {
|
||||
wrapper = factory.wrap(wrapper);
|
||||
Jenkins instance = Jenkins.getInstance();
|
||||
if (instance != null) { // this happens during unit tests
|
||||
ExtensionList<FileCallableWrapperFactory> factories = instance.getExtensionList(FileCallableWrapperFactory.class);
|
||||
for (FileCallableWrapperFactory factory : factories) {
|
||||
wrapper = factory.wrap(wrapper);
|
||||
}
|
||||
}
|
||||
|
||||
return channel.call(wrapper);
|
||||
|
||||
Reference in new issue
Block a user