Format source code.

This commit is contained in:
John Blum
2019-01-29 10:28:27 -08:00
parent 7f2a9eb1f1
commit 6e8cca1425

View File

@@ -89,7 +89,9 @@ public class CloudCacheService extends Service {
* @see #withLocators(String)
*/
public Optional<String> getLocators() {
return Optional.ofNullable(this.locators).filter(StringUtils::hasText);
return Optional.ofNullable(this.locators)
.filter(StringUtils::hasText);
}
/**
@@ -116,7 +118,9 @@ public class CloudCacheService extends Service {
* @see #getGfshUrl()
*/
public CloudCacheService withGfshUrl(URL gfshUrl) {
this.gfshUrl = gfshUrl;
return this;
}
@@ -129,7 +133,9 @@ public class CloudCacheService extends Service {
* @see #getLocators()
*/
public CloudCacheService withLocators(String locators) {
this.locators = locators;
return this;
}
@@ -250,7 +256,8 @@ public class CloudCacheService extends Service {
int index = String.valueOf(value).trim().indexOf("[");
return index > 0 ? value.trim().substring(0, index).trim()
: (index != 0 && StringUtils.hasText(value) ? value.trim() : DEFAULT_LOCATOR_HOST);
: (index != 0 && StringUtils.hasText(value) ? value.trim()
: DEFAULT_LOCATOR_HOST);
}
private static int parsePort(String value) {
@@ -286,7 +293,10 @@ public class CloudCacheService extends Service {
* @return the {@link String name} of the host on which this {@link Locator} is running.
*/
public String getHost() {
return Optional.ofNullable(this.host).filter(StringUtils::hasText).orElse(DEFAULT_LOCATOR_HOST);
return Optional.ofNullable(this.host)
.filter(StringUtils::hasText)
.orElse(DEFAULT_LOCATOR_HOST);
}
/**
@@ -297,7 +307,9 @@ public class CloudCacheService extends Service {
* @return the {@link Integer port} on which this {@link Locator} is listening.
*/
public int getPort() {
return Optional.ofNullable(this.port).orElse(DEFAULT_LOCATOR_PORT);
return Optional.ofNullable(this.port)
.orElse(DEFAULT_LOCATOR_PORT);
}
@Override