From 7b3ddb649f09ed33ee6150ca2211e0511dbf9058 Mon Sep 17 00:00:00 2001
From: Mark Craig <mark.craig@forgerock.com>
Date: Fri, 11 May 2012 08:03:11 +0000
Subject: [PATCH] Cleanup

---
 opendj3/src/main/docbkx/dev-guide/chap-controls.xml |   92 +++++++++++++++++++++++-----------------------
 1 files changed, 46 insertions(+), 46 deletions(-)

diff --git a/opendj3/src/main/docbkx/dev-guide/chap-controls.xml b/opendj3/src/main/docbkx/dev-guide/chap-controls.xml
index 952b498..7aef6d0 100644
--- a/opendj3/src/main/docbkx/dev-guide/chap-controls.xml
+++ b/opendj3/src/main/docbkx/dev-guide/chap-controls.xml
@@ -152,7 +152,7 @@
         writer.writeEntry(connection.readEntry(dn, "description"));
         writer.close();
     } catch (final IOException e) {
-        e.printStackTrace();
+        // The writer could not write to System.out.
     }
 }
 </programlisting>
@@ -189,7 +189,7 @@
         System.out.println("Authorization ID returned: "
                         + control.getAuthorizationID());
     } catch (final DecodeException e) {
-        e.printStackTrace();
+        // Failed to decode the response control.
     }
 }
 </programlisting>
@@ -249,11 +249,11 @@
            }
         }
     } catch (final DecodeException e) {
-        e.printStackTrace();
+        // Failed to decode the response control.
     } catch (final ErrorResultIOException e) {
-        e.printStackTrace();
+        // Request failed due to an IO problem.
     } catch (final SearchResultReferenceIOException e) {
-        e.printStackTrace();
+        // Read a reference, rather than an entry.
     }
 }
 </programlisting>
@@ -306,11 +306,11 @@
         }
         writer.close();
     } catch (final ErrorResultIOException e) {
-        e.printStackTrace();
+        // Request failed due to an IO problem.
     } catch (final SearchResultReferenceIOException e) {
-        e.printStackTrace();
+        // Read a reference, rather than an entry.
     } catch (final IOException e) {
-        e.printStackTrace();
+        // The writer could not write to System.out.
     }
 }
 </programlisting>
@@ -411,11 +411,11 @@
         writer.writeEntry(entry);
         writer.close();
     } catch (final ErrorResultIOException e) {
-        e.printStackTrace();
+        // Request failed due to an IO problem.
     } catch (final SearchResultReferenceIOException e) {
-        e.printStackTrace();
+        // Read a reference, rather than an entry.
     } catch (final IOException e) {
-        e.printStackTrace();
+        // The writer could not write to System.out.
     }
 }
 </programlisting>
@@ -460,7 +460,7 @@
         writer.writeEntry(entry);
         writer.close();
     } catch (final IOException e) {
-        e.printStackTrace();
+        // The writer could not write to System.out.
     }
 }
 </programlisting>
@@ -491,7 +491,7 @@
 
     try {
         connection.bind(dn, pwd);
-    } catch (ErrorResultException e) {
+    } catch (final ErrorResultException e) {
         final Result result = e.getResult();
         try {
             final PasswordExpiredResponseControl control =
@@ -500,8 +500,8 @@
             if (!(control == null) &amp;&amp; control.hasValue()) {
                 System.out.println("Password expired for " + dn);
             }
-        } catch (DecodeException de) {
-            de.printStackTrace();
+        } catch (final DecodeException de) {
+            // Failed to decode the response control.
         }
     }
 }
@@ -539,8 +539,8 @@
             System.out.println("Password for " + dn + " expires in "
                     + control.getSecondsUntilExpiration() + " seconds.");
         }
-    } catch (DecodeException de) {
-        de.printStackTrace();
+    } catch (final DecodeException de) {
+        // Failed to decode the response control.
     }
 }
 </programlisting>
@@ -585,7 +585,7 @@
                     + control.getWarningType().toString() + ", value "
                     + control.getWarningValue() + " for " + dn);
         }
-    } catch (ErrorResultException e) {
+    } catch (final ErrorResultException e) {
         final Result result = e.getResult();
         try {
             final PasswordPolicyResponseControl control =
@@ -595,11 +595,11 @@
                 System.out.println("Password policy error "
                         + control.getErrorType().toString() + " for " + dn);
             }
-        } catch (DecodeException de) {
-            de.printStackTrace();
+        } catch (final DecodeException de) {
+            // Failed to decode the response control.
         }
-    } catch (DecodeException e) {
-        e.printStackTrace();
+    } catch (final DecodeException e) {
+        // Failed to decode the response control.
     }
 }
 </programlisting>
@@ -683,10 +683,10 @@
         final LDIFEntryWriter writer = new LDIFEntryWriter(System.out);
         writer.writeEntry(entry);
         writer.close();
-    } catch (DecodeException e) {
-        e.printStackTrace();
-    } catch (IOException e) {
-        e.printStackTrace();
+    } catch (final DecodeException e) {
+        // Failed to decode the response control.
+    } catch (final IOException e) {
+        // The writer could not write to System.out.
     }
 }
 </programlisting>
@@ -725,10 +725,10 @@
         final LDIFEntryWriter writer = new LDIFEntryWriter(System.out);
         writer.writeEntry(entry);
         writer.close();
-    } catch (DecodeException e) {
-        e.printStackTrace();
-    } catch (IOException e) {
-        e.printStackTrace();
+    } catch (final DecodeException e) {
+        // Failed to decode the response control.
+    } catch (final IOException e) {
+        // The writer could not write to System.out.
     }
 }
 </programlisting>
@@ -770,8 +770,8 @@
     try {
         writer.writeEntry(entry);
         writer.close();
-    } catch (IOException e) {
-        e.printStackTrace();
+    } catch (final IOException e) {
+        // The writer could not write to System.out.
     }
 }</programlisting>
 
@@ -814,8 +814,8 @@
             } else {
                 System.out.println("# Entries not necessarily sorted");
             }
-        } catch (DecodeException e) {
-            e.printStackTrace();
+        } catch (final DecodeException e) {
+            // Failed to decode the response control.
         }
     } else {
         System.out.println("ServerSideSortRequestControl not supported");
@@ -840,8 +840,8 @@
         try {
             writer.writeEntry(entry);
             writer.flush();
-        } catch (IOException e) {
-            e.printStackTrace();
+        } catch (final IOException e) {
+            // The writer could not write to System.out.
         }
         return true;
     }
@@ -918,8 +918,8 @@
                     result.getControl(SimplePagedResultsControl.DECODER,
                             new DecodeOptions());
             cookie = control.getCookie();
-        } catch (DecodeException e) {
-            e.printStackTrace();
+        } catch (final DecodeException e) {
+            // Failed to decode the response control.
         }
 
         ++page;
@@ -991,12 +991,12 @@
             }
         }
         writer.close();
-    } catch (ErrorResultIOException e) {
-        e.printStackTrace();
-    } catch (SearchResultReferenceIOException e) {
-        e.printStackTrace();
-    } catch (IOException e) {
-        e.printStackTrace();
+    } catch (final ErrorResultIOException e) {
+        // Request failed due to an IO problem.
+    } catch (final SearchResultReferenceIOException e) {
+        // Read a reference, rather than an entry.
+    } catch (final IOException e) {
+        // The writer could not write to System.out.
     }
 }
 </programlisting>
@@ -1100,8 +1100,8 @@
         System.out.println("# Position in list: "
                 + vlvControl.getTargetPosition() + "/"
                 + vlvControl.getContentCount());
-    } catch (DecodeException e) {
-        e.printStackTrace();
+    } catch (final DecodeException e) {
+        // Failed to decode the response control.
     }
 }
 </programlisting>

--
Gitblit v1.10.0