Skip to content

Commit

Permalink
FISH-9854 Rename method and add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
kalinchan committed Oct 8, 2024
1 parent d077dfc commit ac1cd6d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ protected boolean isRunning() {
return isRunningByCheckingForPidFile();
}

ProcessState b = ProcessUtils.isProcessRunningState(pp);
ProcessState b = ProcessUtils.getProcessRunningState(pp);

if (b == ProcessState.ERROR) { // this means it couldn't find out!
return isRunningUsingJps();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -389,11 +389,11 @@ private void waitForParentDeath(int pid) throws CommandException {
long start = System.currentTimeMillis();
try {
do {
ProcessState b = ProcessUtils.isProcessRunningState(pid);
ProcessState b = ProcessUtils.getProcessRunningState(pid);
if (b == ProcessState.ERROR) {
// this means we were unable to find out from the OS if the process
// is running or not
debugMessage("ProcessUtils.isProcessRunning(" + pid + ") "
debugMessage("ProcessUtils.getProcessRunningState(" + pid + ") "
+ "returned null which means we can't get process "
+ "info on this platform.");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ public static String killJvm(String classname) {
/**
* The deprecated isProcessingRunning method
*
* DO NOT USE! Retained for semantic versioning. Replaced by {@link ProcessUtils#isProcessRunningState(int)}.
* DO NOT USE! Retained for semantic versioning. Replaced by {@link ProcessUtils#getProcessRunningState(int)}.
*/
@Deprecated(forRemoval = true, since = "6.21.0")
public static Boolean isProcessRunning(int aPid) {
Expand All @@ -190,7 +190,7 @@ public static Boolean isProcessRunning(int aPid) {
* @return true if it's running, false if not and null if we don't know. I.e
* the return value is a true tri-state Boolean.
*/
public static ProcessState isProcessRunningState(int aPid) {
public static ProcessState getProcessRunningState(int aPid) {
try {
if (OS.isWindowsForSure())
return isProcessRunningWindows(aPid);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
import java.io.*;
import java.io.File;
import java.nio.charset.StandardCharsets;
import java.util.logging.Logger;

import com.sun.enterprise.universal.i18n.LocalStringsImpl;
import com.sun.enterprise.universal.io.SmartFile;
Expand Down Expand Up @@ -132,7 +133,7 @@ public ServerDirs(File leaf) throws IOException {
try (BufferedReader r = new BufferedReader(new FileReader(localPasswordFile, StandardCharsets.UTF_8))) {
localPasswordBuffer = r.readLine();
} catch (Exception e) {
// needs no handling
LOGGER.fine("Error reading local password file: " + localPasswordFile);
} finally {
localPassword = localPasswordBuffer;
// ignore
Expand Down Expand Up @@ -253,6 +254,7 @@ public String toString() {
///////////////////////////////////////////////////////////////////////////
/////////// All Private Below /////////////////////////
///////////////////////////////////////////////////////////////////////////
private static final Logger LOGGER = Logger.getLogger(ServerDirs.class.getName());
private final String serverName;
private final File serverDir;
private final File parentDir;
Expand Down

0 comments on commit ac1cd6d

Please sign in to comment.