From 80d87dff17669f3d02016bf41d99ca41762abc1c Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Wed, 07 Oct 2009 12:43:38 +0000
Subject: [PATCH] Fix for issue 4271 (control-panel: in remote mode, "Installation Path" is incorrect) Since using File when you have different OS in the control panel and in the managed server can be really problematic, use String instead in the ServerDescriptor object.
---
opendj-sdk/opends/src/guitools/org/opends/guitools/controlpanel/ui/StatusPanel.java | 31 ++++++-------------------------
1 files changed, 6 insertions(+), 25 deletions(-)
diff --git a/opendj-sdk/opends/src/guitools/org/opends/guitools/controlpanel/ui/StatusPanel.java b/opendj-sdk/opends/src/guitools/org/opends/guitools/controlpanel/ui/StatusPanel.java
index 0dd9de2..6ea99e9 100644
--- a/opendj-sdk/opends/src/guitools/org/opends/guitools/controlpanel/ui/StatusPanel.java
+++ b/opendj-sdk/opends/src/guitools/org/opends/guitools/controlpanel/ui/StatusPanel.java
@@ -35,8 +35,6 @@
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
-import java.io.File;
-import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
@@ -402,46 +400,29 @@
administrativeUsers.setText(
INFO_NOT_AVAILABLE_SHORT_LABEL.get().toString());
}
- File install = desc.getInstallPath();
+ String install = desc.getInstallPath();
if (install != null)
{
- installPath.setText(install.getAbsolutePath());
+ installPath.setText(install);
}
else
{
installPath.setText(INFO_NOT_AVAILABLE_SHORT_LABEL.get().toString());
}
- File instance = desc.getInstancePath();
+ String instance = desc.getInstancePath();
if (instance != null)
{
- instancePath.setText(instance.getAbsolutePath());
+ instancePath.setText(instance);
}
else
{
instancePath.setText(INFO_NOT_AVAILABLE_SHORT_LABEL.get().toString());
}
- boolean sameInstallAndInstance;
- try
- {
- if (instance != null)
- {
- sameInstallAndInstance = instance.getCanonicalFile().equals(install);
- }
- else
- {
- sameInstallAndInstance = install == null;
- }
- }
- catch (IOException ioe)
- {
- // Best effort
- sameInstallAndInstance = instance.getAbsoluteFile().equals(install);
- }
- instancePath.setVisible(!sameInstallAndInstance);
- lInstancePath.setVisible(!sameInstallAndInstance);
+ instancePath.setVisible(!desc.sameInstallAndInstance());
+ lInstancePath.setVisible(!desc.sameInstallAndInstance());
if (desc.getOpenDSVersion() != null)
{
--
Gitblit v1.10.0