Optimize code
This commit is contained in:
parent
37b9004569
commit
4c5b06c5bb
@ -104,14 +104,11 @@ public class NacosNamingService implements NamingService {
|
||||
|
||||
private int initClientBeatThreadCount(Properties properties) {
|
||||
if (properties == null) {
|
||||
|
||||
return UtilAndComs.DEFAULT_CLIENT_BEAT_THREAD_COUNT;
|
||||
}
|
||||
|
||||
int clientBeatThreadCount = NumberUtils.toInt(properties.getProperty(PropertyKeyConst.NAMING_CLIENT_BEAT_THREAD_COUNT),
|
||||
return NumberUtils.toInt(properties.getProperty(PropertyKeyConst.NAMING_CLIENT_BEAT_THREAD_COUNT),
|
||||
UtilAndComs.DEFAULT_CLIENT_BEAT_THREAD_COUNT);
|
||||
|
||||
return clientBeatThreadCount;
|
||||
}
|
||||
|
||||
private int initPollingThreadCount(Properties properties) {
|
||||
@ -120,10 +117,8 @@ public class NacosNamingService implements NamingService {
|
||||
return UtilAndComs.DEFAULT_POLLING_THREAD_COUNT;
|
||||
}
|
||||
|
||||
int pollingThreadCount = NumberUtils.toInt(properties.getProperty(PropertyKeyConst.NAMING_POLLING_THREAD_COUNT),
|
||||
return NumberUtils.toInt(properties.getProperty(PropertyKeyConst.NAMING_POLLING_THREAD_COUNT),
|
||||
UtilAndComs.DEFAULT_POLLING_THREAD_COUNT);
|
||||
|
||||
return pollingThreadCount;
|
||||
}
|
||||
|
||||
private boolean isLoadCacheAtStart(Properties properties) {
|
||||
|
Loading…
Reference in New Issue
Block a user