From 884a71db1ce4fe92007216b306405bd629835bc7 Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Tue, 24 Mar 2009 12:58:17 +0000
Subject: [PATCH] Fix for issue 3826 (Exception in control panel LDAP browser)
---
opends/src/guitools/org/opends/guitools/controlpanel/browser/BrowserController.java | 17 ++++++++++++++---
1 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/opends/src/guitools/org/opends/guitools/controlpanel/browser/BrowserController.java b/opends/src/guitools/org/opends/guitools/controlpanel/browser/BrowserController.java
index 644c48a..039b2cf 100644
--- a/opends/src/guitools/org/opends/guitools/controlpanel/browser/BrowserController.java
+++ b/opends/src/guitools/org/opends/guitools/controlpanel/browser/BrowserController.java
@@ -258,8 +258,12 @@
* @param suffixDn the DN of the suffix to be analyzed.
* @return <CODE>true</CODE> if the provided String is the DN of a suffix
* and <CODE>false</CODE> otherwise.
+ * @throws IllegalArgumentException if a node with the given dn exists but
+ * is not a suffix node.
*/
- public boolean hasSuffix(String suffixDn) {
+ public boolean hasSuffix(String suffixDn)
+ throws IllegalArgumentException
+ {
return (findSuffixNode(suffixDn, rootNode) != null);
}
@@ -270,8 +274,11 @@
* @param parentSuffixDn the DN of the parent suffix (or <CODE>null</CODE> if
* there is no parent DN).
* @return the TreePath of the new node.
+ * @throws IllegalArgumentException if a node with the given dn exists.
*/
- public TreePath addSuffix(String suffixDn, String parentSuffixDn) {
+ public TreePath addSuffix(String suffixDn, String parentSuffixDn)
+ throws IllegalArgumentException
+ {
SuffixNode parentNode;
if (parentSuffixDn != null) {
parentNode = findSuffixNode(parentSuffixDn, rootNode);
@@ -1926,8 +1933,12 @@
* @param suffixNode the node from which we start searching.
* @return the SuffixNode associated with the provided DN. <CODE>null</CODE>
* if nothing is found.
+ * @throws IllegalArgumentException if a node with the given dn exists but
+ * is not a suffix node.
*/
- SuffixNode findSuffixNode(String suffixDn, SuffixNode suffixNode) {
+ SuffixNode findSuffixNode(String suffixDn, SuffixNode suffixNode)
+ throws IllegalArgumentException
+ {
SuffixNode result;
if (Utilities.areDnsEqual(suffixNode.getDN(), suffixDn)) {
--
Gitblit v1.10.0