You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by kl...@apache.org on 2017/10/19 17:13:24 UTC

[geode] 03/04: Isolate new methods accepting workingDirectory to only require workingDirectory

This is an automated email from the ASF dual-hosted git repository.

klund pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git

commit 674fd88cc3501c32f1d8b560c31fdfb19bba5a82
Author: Kirk Lund <kl...@apache.org>
AuthorDate: Wed Oct 18 13:00:16 2017 -0700

    Isolate new methods accepting workingDirectory to only require workingDirectory
---
 .../java/org/apache/geode/admin/jmx/internal/AgentLauncher.java   | 8 ++++----
 .../jmx/internal/DeprecatedAgentLauncherIntegrationTest.java      | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/geode-core/src/main/java/org/apache/geode/admin/jmx/internal/AgentLauncher.java b/geode-core/src/main/java/org/apache/geode/admin/jmx/internal/AgentLauncher.java
index d38ba2a..80c3a17 100644
--- a/geode-core/src/main/java/org/apache/geode/admin/jmx/internal/AgentLauncher.java
+++ b/geode-core/src/main/java/org/apache/geode/admin/jmx/internal/AgentLauncher.java
@@ -588,10 +588,10 @@ public class AgentLauncher {
    * Removes an agent's status file
    */
   protected void deleteStatus() throws IOException {
-    deleteStatus(workingDirectory, statusFileName);
+    deleteStatus(workingDirectory);
   }
 
-  void deleteStatus(final File workingDirectory, final String statusFileName) throws IOException {
+  void deleteStatus(final File workingDirectory) throws IOException {
     final File statusFile = new File(workingDirectory, statusFileName);
 
     if (statusFile.exists() && !statusFile.delete()) {
@@ -611,10 +611,10 @@ public class AgentLauncher {
    *         type Status.
    */
   protected Status readStatus() throws IOException {
-    return readStatus(workingDirectory, statusFileName);
+    return readStatus(workingDirectory);
   }
 
-  Status readStatus(final File workingDirectory, final String statusFileName) throws IOException {
+  Status readStatus(final File workingDirectory) throws IOException {
     FileInputStream fileIn = null;
     ObjectInputStream objectIn = null;
 
diff --git a/geode-core/src/test/java/org/apache/geode/admin/jmx/internal/DeprecatedAgentLauncherIntegrationTest.java b/geode-core/src/test/java/org/apache/geode/admin/jmx/internal/DeprecatedAgentLauncherIntegrationTest.java
index 0f350ef..841d1de 100644
--- a/geode-core/src/test/java/org/apache/geode/admin/jmx/internal/DeprecatedAgentLauncherIntegrationTest.java
+++ b/geode-core/src/test/java/org/apache/geode/admin/jmx/internal/DeprecatedAgentLauncherIntegrationTest.java
@@ -239,13 +239,13 @@ public class DeprecatedAgentLauncherIntegrationTest {
 
     assertThat(expectedStatusFile).exists();
 
-    final AgentLauncher.Status actualStatus = launcher.readStatus(temporaryFolder.getRoot(), expectedStatusFile.getName());
+    final AgentLauncher.Status actualStatus = launcher.readStatus(temporaryFolder.getRoot());
 
     assertThat(actualStatus).isNotNull();
     assertAgentLauncherStatusEquals(expectedStatus, actualStatus);
     assertThat(expectedStatusFile).exists();
 
-    launcher.deleteStatus(temporaryFolder.getRoot(), expectedStatusFile.getName());
+    launcher.deleteStatus(temporaryFolder.getRoot());
 
     assertThat(expectedStatusFile).doesNotExist();
   }

-- 
To stop receiving notification emails like this one, please contact
"commits@geode.apache.org" <co...@geode.apache.org>.