Skip to content

Commit 027cb2c

Browse files
committed
#42: refactoring after review
1 parent 7222dd2 commit 027cb2c

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

metrics-facade-base/src/main/java/com/ringcentral/platform/metrics/AbstractMetricRegistry.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ protected AbstractMetricRegistry(
242242
}
243243

244244
public static ScheduledExecutorService makeDefaultExecutor() {
245-
return newSingleThreadScheduledExecutor(new BasicThreadFactory("metric-registry-executor-%d"));
245+
return newSingleThreadScheduledExecutor(new BasicThreadFactory("metric-registry-executor-%d", true));
246246
}
247247

248248
public static PredicativeMetricNamedInfoProvider<MetricMod> makeDefaultModsProvider() {

metrics-facade-base/src/main/java/com/ringcentral/platform/metrics/utils/BasicThreadFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ public class BasicThreadFactory implements ThreadFactory {
1313
private final boolean daemon;
1414
private final AtomicInteger threadNumber = new AtomicInteger(1);
1515

16-
public BasicThreadFactory(String namePattern) {
17-
this(Executors.defaultThreadFactory(), namePattern, true);
16+
public BasicThreadFactory(String namePattern, boolean daemon) {
17+
this(Executors.defaultThreadFactory(), namePattern, daemon);
1818
}
1919

2020
public BasicThreadFactory(ThreadFactory parent, String namePattern, boolean daemon) {

metrics-facade-base/src/main/java/com/ringcentral/platform/metrics/utils/StringUtils.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ public class StringUtils {
44

55
public static final String EMPTY_STRING = "";
66

7+
public static boolean isNotBlank(final CharSequence cs) {
8+
return !isBlank(cs);
9+
}
10+
711
/**
812
* Checks if a CharSequence is null, empty, or contains only whitespace characters (Character.isWhitespace(char) == true).
913
*
@@ -35,10 +39,6 @@ public static boolean isBlank(CharSequence cs) {
3539
return true;
3640
}
3741

38-
public static boolean isNotBlank(final CharSequence cs) {
39-
return !isBlank(cs);
40-
}
41-
4242
/**
4343
* Splits a given string into an array of substrings divided by the dot (.) character.
4444
*/

0 commit comments

Comments
 (0)