NPE during ES startup when using S3 gateway with the europe region specified, closes #659.

This commit is contained in:
kimchy 2011-02-08 11:31:33 +02:00
parent b8c644cab5
commit 05283c7f6d
2 changed files with 6 additions and 2 deletions

View File

@ -94,7 +94,9 @@ public class AwsEc2Service extends AbstractLifecycleComponent<AwsEc2Service> {
} else {
throw new ElasticSearchIllegalArgumentException("No automatic endpoint could be derived from region [" + region + "]");
}
client.setEndpoint(endpoint);
if (endpoint != null) {
client.setEndpoint(endpoint);
}
}
return this.client;

View File

@ -94,7 +94,9 @@ public class AwsS3Service extends AbstractLifecycleComponent<AwsS3Service> {
} else {
throw new ElasticSearchIllegalArgumentException("No automatic endpoint could be derived from region [" + region + "]");
}
client.setEndpoint(endpoint);
if (endpoint != null) {
client.setEndpoint(endpoint);
}
}
return this.client;