Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor log fix #3305

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class AlertingSubsystemInit {
// TODO (trask) inject instead of using global
private static volatile AlertingSubsystem alertingSubsystem;

private static final Logger logger = LoggerFactory.getLogger(AlertingSubsystem.class);
private static final Logger logger = LoggerFactory.getLogger(AlertingSubsystemInit.class);

public static AlertingSubsystem create(
Configuration.ProfilerConfiguration configuration,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ private static void sendTenuredFillPercentageToAlerting(
long currentLevel = tenuredUsage.getUsed();
long max = tenuredUsage.getMax();
if (max > 0) {
double percentage = 100.0 * (double) currentLevel / (double) max;
double percentage = 100.0 * currentLevel / max;
alertingSubsystem.track(AlertMetricType.MEMORY, percentage);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ public static String getOsPlatformDescription() {
}

private static boolean isWindows() {
return getOsName().startsWith("Windows");
return getOsName().startsWith(WINDOWS);
}

private static boolean isLinux() {
return getOsName().startsWith("Linux") || getOsName().startsWith("LINUX");
return getOsName().startsWith(LINUX) || getOsName().startsWith("LINUX");
}

private static boolean isMac() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public static <T> T findServiceLoader(Class<T> clazz) {

public static <T> T findServiceLoader(Class<T> clazz, boolean includeExtensionClassPath) {
List<T> services = findAllServiceLoaders(clazz, includeExtensionClassPath);
if (services.size() > 0) {
if (!services.isEmpty()) {
return services.get(0);
}
return null;
Expand Down