javacommons/utils/tsrc/javasrc/com/nokia/mj/impl/utils/DebugUtilsTests.java
changeset 72 1f0034e370aa
parent 67 63b81d807542
--- a/javacommons/utils/tsrc/javasrc/com/nokia/mj/impl/utils/DebugUtilsTests.java	Thu Sep 02 13:22:59 2010 +0300
+++ b/javacommons/utils/tsrc/javasrc/com/nokia/mj/impl/utils/DebugUtilsTests.java	Fri Sep 17 16:44:34 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();
         }
     }
 }