From 10948b56d9da058dde6838e7566c72966fc7856c Mon Sep 17 00:00:00 2001
From: kenneth_suter <kenneth_suter@localhost>
Date: Sat, 07 Apr 2007 00:06:48 +0000
Subject: [PATCH] completed migration of code to use Installer constants and methods for filesystem related tasks

---
 opends/src/quicksetup/org/opends/quicksetup/CurrentInstallStatus.java |   18 +++++++-----------
 1 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/opends/src/quicksetup/org/opends/quicksetup/CurrentInstallStatus.java b/opends/src/quicksetup/org/opends/quicksetup/CurrentInstallStatus.java
index ffc2e89..97522b4 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/CurrentInstallStatus.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/CurrentInstallStatus.java
@@ -296,16 +296,6 @@
   }
 
   /**
-   * Provides the config file path (path to config.ldif file).
-   *
-   * @return the config file path.
-   */
-  private String getConfigFilePath()
-  {
-    return Utils.getConfigFileFromClasspath();
-  }
-
-  /**
    * Provides the LDAP port as is specified in the config.ldif file.
    *
    * @return the LDAP port specified in the config.ldif file.
@@ -411,7 +401,9 @@
       StringBuffer buf = new StringBuffer();
       try
       {
-        FileReader reader = new FileReader(getConfigFilePath());
+        Installation installation = getInstallationFromClassPath();
+        FileReader reader =
+                new FileReader(installation.getCurrentConfigurationFile());
         BufferedReader in = new BufferedReader(reader);
         String line;
         // We do not care about encoding: we are just interested in the ports
@@ -481,4 +473,8 @@
           index1 + attrName.length());
     }
   }
+
+  private Installation getInstallationFromClassPath() {
+    return new Installation(Utils.getInstallPathFromClasspath());
+  }
 }

--
Gitblit v1.10.0