yozaner1324 commented on code in PR #7582: URL: https://github.com/apache/geode/pull/7582#discussion_r849968837
########## geode-core/src/main/java/org/apache/geode/internal/process/FileProcessController.java: ########## @@ -117,13 +117,21 @@ private String status(final File workingDir, final String statusRequestFileName, File statusFile = new File(workingDir, statusFileName); AtomicReference<String> statusRef = new AtomicReference<>(); - ControlRequestHandler statusHandler = () -> { - // read the statusFile - StringBuilder lines = new StringBuilder(); - try (BufferedReader reader = new BufferedReader(new FileReader(statusFile))) { - reader.lines().forEach(lines::append); - } finally { - statusRef.set(lines.toString()); + ControlRequestHandler statusHandler = new ControlRequestHandler() { + @Override + public void handleRequest() throws IOException { + handleRequest(null); + } + + @Override + public void handleRequest(FileReader fileReader) throws IOException { + // read the statusFile + StringBuilder lines = new StringBuilder(); + try (BufferedReader reader = new BufferedReader(fileReader)) { Review Comment: Yes, that isn't good. I think I've found a better way to fix this bug without doing this. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@geode.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org