I would like to understand if using a non-final variable would cause a race condition. I have a spring boot application where we instantiate a finagle client like shown below. Can this cause a race condition. If so why?
public class Client{
private JavaService<Request,Response> client;
Client(Config config){
this.client = create(config);
}
public CompletableFuture<Request, Response> testClient() {
return client.apply();
}
}