JschConfigSessionFactory: [findbugs] Set synchronized

Set synchronized to make the config access consistent.

> Inconsistent synchronization of
org.eclipse.jgit.transport.JschConfigSessionFactory.config; locked 80%
of time

In order to make JschConfigSessionFactory threadsafe, synchronize this
method as well.

Change-Id: I32d1bfc2e98363d254992144e795ce72fe1e8846
Signed-off-by: Masaya Suzuki <masayasuzuki@google.com>
This commit is contained in:
Masaya Suzuki 2019-03-31 10:37:25 -07:00
parent 81acf3b440
commit 6272694185
1 changed files with 1 additions and 1 deletions

View File

@ -551,7 +551,7 @@ public String[] getValues(String key) {
* @param config * @param config
* to use * to use
*/ */
void setConfig(OpenSshConfig config) { synchronized void setConfig(OpenSshConfig config) {
this.config = config; this.config = config;
} }
} }