From 32fc01cbb578afb62cb4b678f4066976e8ee6337 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Thu, 09 Nov 2006 16:51:44 +0000
Subject: [PATCH] Update the matched values control test case to replace a couple of calls to catch Exception with catch Throwable.  This is necessary because when assertions are enabled when running the unit tests, an AssertionError will be generated by the methods in the Validator class rather than an exception, and Throwable covers both exceptions and errors whereas Exception doesn't handle errors.

---
 opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/controls/MatchedValuesControlTest.java |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/controls/MatchedValuesControlTest.java b/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/controls/MatchedValuesControlTest.java
index 55dd1c7..6a3eedd 100644
--- a/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/controls/MatchedValuesControlTest.java
+++ b/opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/controls/MatchedValuesControlTest.java
@@ -361,11 +361,11 @@
           }
         }
       }
-      catch (Exception e)
+      catch (Throwable t)
       {
         if ( ! exceptionExpected)
         {
-          assertTrue(false, "Exception not excepted: " + e.getMessage());
+          assertTrue(false, "Exception not excepted: " + t.getMessage());
         }
       }
     }
@@ -933,11 +933,11 @@
           assertEquals(attValueTestCurrent, mvf.getAssertionValue());
         }
       }
-      catch (Exception e)
+      catch (Throwable t)
       {
         if ( ! exceptionExpected)
         {
-          assertTrue(false, "Exception not excepted" + e.getMessage());
+          assertTrue(false, "Exception not excepted" + t.getMessage());
         }
       }
     }

--
Gitblit v1.10.0