olegz/spring-integration — comment on commit ec0a709d2b94f41bdd33fe3ace7e0039b09e2f76
File: spring-integration-file/src/main/java/org/springframework/integration/file/remote/session/CachingSessionFactory.java line 94
By markfisher:

you could reduce the scope of the synchronized block, by assigning the result of incrementAndGet to a var that you then check below instead of calling get() again