| Chunk |
|---|
| Conflicting content |
|---|
public FailureDetector getFailureDetector() {
// first check: avoids locking as the field is volatile
FailureDetector result = failureDetector;
<<<<<<< HEAD
if(result == null) {
String clusterXml = bootstrapMetadataWithRetries(MetadataStore.CLUSTER_KEY,
bootstrapUrls);
Cluster cluster = clusterMapper.readCluster(new StringReader(clusterXml));
=======
if (result == null) {
String clusterXml = bootstrapMetadataWithRetries(MetadataStore.CLUSTER_KEY, bootstrapUrls);
Cluster cluster = clusterMapper.readCluster(new StringReader(clusterXml), false);
>>>>>>> f9687d62fe65eb5a97d8aba71597daa43c8962ce
synchronized(this) {
// second check: avoids double initialization
result = failureDetector; |
| Solution content |
|---|
public FailureDetector getFailureDetector() {
// first check: avoids locking as the field is volatile
FailureDetector result = failureDetector;
if (result == null) {
String clusterXml = bootstrapMetadataWithRetries(MetadataStore.CLUSTER_KEY, bootstrapUrls);
Cluster cluster = clusterMapper.readCluster(new StringReader(clusterXml), false);
synchronized(this) {
// second check: avoids double initialization
result = failureDetector; |
| File |
|---|
| AbstractStoreClientFactory.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| If statement |
| Method invocation |
| Variable |