Bladeren bron

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>
tags/v5.5.0.201908280940-m3
Masaya Suzuki 5 jaren geleden
bovenliggende
commit
6272694185
1 gewijzigde bestanden met toevoegingen van 1 en 1 verwijderingen
  1. 1
    1
      org.eclipse.jgit/src/org/eclipse/jgit/transport/JschConfigSessionFactory.java

+ 1
- 1
org.eclipse.jgit/src/org/eclipse/jgit/transport/JschConfigSessionFactory.java Bestand weergeven

@@ -551,7 +551,7 @@ public abstract class JschConfigSessionFactory extends SshSessionFactory {
* @param config
* to use
*/
void setConfig(OpenSshConfig config) {
synchronized void setConfig(OpenSshConfig config) {
this.config = config;
}
}

Laden…
Annuleren
Opslaan