javacommons/utils/tsrc/javasrc/com/nokia/mj/impl/utils/DebugUtilsTests.java
changeset 79 2f468c1958d0
parent 76 4ad59aaee882
--- a/javacommons/utils/tsrc/javasrc/com/nokia/mj/impl/utils/DebugUtilsTests.java	Fri Sep 17 08:28:21 2010 +0300
+++ b/javacommons/utils/tsrc/javasrc/com/nokia/mj/impl/utils/DebugUtilsTests.java	Mon Oct 04 00:10:53 2010 +0300
@@ -70,25 +70,19 @@
     {
         try
         {
-            try
-            {
-                DebugUtils.getStackTrace(null);
-                assertTrue("No exception.", false);
-            }
-            catch (NullPointerException ne)
-            {
-            }
+            String res = DebugUtils.getStackTrace(null);
+            assertTrue("Not null: " + res, res == null);
 
             Exception e1 = new Exception("Test 42");
-            String res = DebugUtils.getStackTrace(e1);
+            res = DebugUtils.getStackTrace(e1);
             boolean ok = res.indexOf("at com.nokia.mj.impl.utils.DebugUtilsTests.testStackTrace") >= 0;
             assertTrue("Exception didn't contain: " + res, ok);
 
         }
         catch (Throwable t)
         {
+            t.printStackTrace();
             assertTrue(t.toString(), false);
-            t.printStackTrace();
         }
     }
 }