[Fedora-directory-commits] directoryconsole/src/com/netscape/admin/dirserv DSAdmin.java, 1.4, 1.5
Noriko Hosoi (nhosoi)
fedora-directory-commits at redhat.com
Wed Jul 11 01:26:26 UTC 2007
Author: nhosoi
Update of /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv8374/src/com/netscape/admin/dirserv
Modified Files:
DSAdmin.java
Log Message:
Resolves: #247215
Summary: Reimplement ds_remove without setuputil code (comment #16)
Description: if searching sieDN returns NO_SUCH_OBJECT, skips the remove
operation and shows "Success!" dialog.
Index: DSAdmin.java
===================================================================
RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/DSAdmin.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- DSAdmin.java 2 Jul 2007 19:44:08 -0000 1.4
+++ DSAdmin.java 11 Jul 2007 01:26:23 -0000 1.5
@@ -986,15 +986,25 @@
LDAPEntry sieEntry = null;
try {
sieEntry = ldc.read( sieDN, attrs );
- } catch (Exception ex ) {
- Debug.println( "DSAdmin:removeServer <" + sieDN + "> " + ex);
+ } catch ( LDAPException ex ) {
+ Debug.println("DSAdmin:removeServer <" + sieDN + "> " + ex);
+ // Ignore the no such object error; sieEntry is already removed
+ if ( ex.getLDAPResultCode() == ex.NO_SUCH_OBJECT ) {
+ status = true;
+ } else {
+ args[1] = ex.toString();
+ DSUtil.showErrorDialog(frame, "removeinstance", args);
+ _removed = false; // problem reading sieEntry
+ return false;
+ }
+ } catch ( Exception ex ) {
+ Debug.println("DSAdmin:removeServer <" + sieDN + "> " + ex);
args[1] = ex.toString();
- DSUtil.showErrorDialog(frame, "removeinstance",
- args);
- _removed = false; // remove failed
+ DSUtil.showErrorDialog(frame, "removeinstance", args);
+ _removed = false; // problem reading sieEntry
return false;
}
- if (sieEntry != null ) {
+ if ( sieEntry != null ) {
try {
status = delete_sieTree(sieEntry );
} catch (Exception ex ) {
@@ -1009,7 +1019,7 @@
// Now we need to remove the reference of this server
status = remove_serverInstance(sieDN);
}
- if ( status == false) {
+ if ( status == false ) {
args[1] = "";
DSUtil.showErrorDialog(frame, "removesie",
args);
More information about the Fedora-directory-commits
mailing list