diff options
Diffstat (limited to 'java/com/google/gerrit/sshd/SshCommand.java')
-rw-r--r-- | java/com/google/gerrit/sshd/SshCommand.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/java/com/google/gerrit/sshd/SshCommand.java b/java/com/google/gerrit/sshd/SshCommand.java index 9df263b860..a4e427d1eb 100644 --- a/java/com/google/gerrit/sshd/SshCommand.java +++ b/java/com/google/gerrit/sshd/SshCommand.java @@ -23,6 +23,7 @@ import com.google.gerrit.server.DynamicOptions; import com.google.gerrit.server.InvalidDeadlineException; import com.google.gerrit.server.RequestInfo; import com.google.gerrit.server.RequestListener; +import com.google.gerrit.server.cache.PerThreadCache; import com.google.gerrit.server.cancellation.RequestCancelledException; import com.google.gerrit.server.cancellation.RequestStateContext; import com.google.gerrit.server.config.GerritServerConfig; @@ -62,7 +63,8 @@ public abstract class SshCommand extends BaseCommand { public void start(ChannelSession channel, Environment env) throws IOException { startThread( () -> { - try (DynamicOptions pluginOptions = new DynamicOptions(injector, dynamicBeans)) { + try (PerThreadCache ignored = PerThreadCache.create(); + DynamicOptions pluginOptions = new DynamicOptions(injector, dynamicBeans)) { parseCommandLine(pluginOptions); stdout = toPrintWriter(out); stderr = toPrintWriter(err); |