1
0
mirror of https://gitee.com/mirrors/Spring-Cloud-Alibaba.git synced 2021-06-26 13:25:11 +08:00

style(nacos): Standard code style.

This commit is contained in:
chuntaojun
2019-09-05 11:13:59 +08:00
parent 7265046eab
commit e4d85b6c7e
26 changed files with 217 additions and 206 deletions

View File

@@ -57,7 +57,8 @@ public class NacosPropertySourceLocator implements PropertySourceLocator {
private NacosConfigManager nacosConfigManager;
public NacosPropertySourceLocator(NacosConfigManager nacosConfigManager, NacosConfigProperties nacosConfigProperties) {
public NacosPropertySourceLocator(NacosConfigManager nacosConfigManager,
NacosConfigProperties nacosConfigProperties) {
this.nacosConfigManager = nacosConfigManager;
this.nacosConfigProperties = nacosConfigProperties;
}
@@ -199,19 +200,16 @@ public class NacosPropertySourceLocator implements PropertySourceLocator {
if (stringBuilder.length() > 0) {
String result = stringBuilder.substring(0, stringBuilder.length() - 1);
throw new IllegalStateException(String.format(
"[%s] must end file extension with properties|yaml|yml",
result));
"[%s] must end file extension with properties|yaml|yml", result));
}
}
private static boolean canLoadFileExtension(String dataId) {
return SUPPORT_FILE_EXTENSION.stream()
.anyMatch((fileExtension) -> StringUtils.endsWithIgnoreCase(dataId,
fileExtension));
return SUPPORT_FILE_EXTENSION.stream().anyMatch(
(fileExtension) -> StringUtils.endsWithIgnoreCase(dataId, fileExtension));
}
private boolean checkDataIdIsRefreshable(String refreshDataIds,
String sharedDataId) {
private boolean checkDataIdIsRefreshable(String refreshDataIds, String sharedDataId) {
if (StringUtils.isEmpty(refreshDataIds)) {
return false;
}