From cf0091eb2e5f75e7e0698e835e277ae7c1c675be Mon Sep 17 00:00:00 2001
From: Nicolas Capponi <nicolas.capponi@forgerock.com>
Date: Wed, 04 Dec 2013 09:59:53 +0000
Subject: [PATCH] Minor naming update for StaticUtils#stackTraceToSingleLineString methods

---
 opendj-sdk/opendj-core/src/main/java/com/forgerock/opendj/util/StaticUtils.java         |   13 +++++++------
 opendj-sdk/opendj-core/src/test/java/com/forgerock/opendj/util/StaticUtilsTestCase.java |    4 ++--
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/opendj-sdk/opendj-core/src/main/java/com/forgerock/opendj/util/StaticUtils.java b/opendj-sdk/opendj-core/src/main/java/com/forgerock/opendj/util/StaticUtils.java
index d71bc15..d3a6f38 100644
--- a/opendj-sdk/opendj-core/src/main/java/com/forgerock/opendj/util/StaticUtils.java
+++ b/opendj-sdk/opendj-core/src/main/java/com/forgerock/opendj/util/StaticUtils.java
@@ -1823,15 +1823,15 @@
      *
      * @param throwable
      *            The exception for which to retrieve the stack trace.
-     * @param isDebug
+     * @param isFullStack
      *            If {@code true}, provides the full stack trace, otherwise
      *            provides a limited extract of stack trace
      * @return A stack trace from the provided exception as a single-line
      *         string.
      */
-    public static String stackTraceToSingleLineString(Throwable throwable, boolean isDebug) {
+    public static String stackTraceToSingleLineString(Throwable throwable, boolean isFullStack) {
         StringBuilder buffer = new StringBuilder();
-        stackTraceToSingleLineString(buffer, throwable, isDebug);
+        stackTraceToSingleLineString(buffer, throwable, isFullStack);
         return buffer.toString();
     }
 
@@ -1844,15 +1844,15 @@
      *            The buffer to which the information is to be appended.
      * @param throwable
      *            The exception for which to retrieve the stack trace.
-     * @param isDebug
+     * @param isFullStack
      *            If {@code true}, provides the full stack trace, otherwise
      *            provides a limited extract of stack trace
      */
-    public static void stackTraceToSingleLineString(StringBuilder buffer, Throwable throwable, boolean isDebug) {
+    public static void stackTraceToSingleLineString(StringBuilder buffer, Throwable throwable, boolean isFullStack) {
         if (throwable == null) {
             return;
         }
-        if (isDebug) {
+        if (isFullStack) {
             buffer.append(throwable);
             // add first-level stack trace
             for (StackTraceElement e : throwable.getStackTrace()) {
@@ -1906,6 +1906,7 @@
                 buffer.append(e.getLineNumber());
                 i++;
             }
+
             buffer.append(")");
         }
     }
diff --git a/opendj-sdk/opendj-core/src/test/java/com/forgerock/opendj/util/StaticUtilsTestCase.java b/opendj-sdk/opendj-core/src/test/java/com/forgerock/opendj/util/StaticUtilsTestCase.java
index 11192ac..effeb01 100644
--- a/opendj-sdk/opendj-core/src/test/java/com/forgerock/opendj/util/StaticUtilsTestCase.java
+++ b/opendj-sdk/opendj-core/src/test/java/com/forgerock/opendj/util/StaticUtilsTestCase.java
@@ -198,7 +198,7 @@
     }
 
     @Test
-    public void testStackTraceToSingleLineDebugIsFalse() throws Exception {
+    public void testStackTraceToSingleLineLimitedStack() throws Exception {
         String trace = stackTraceToSingleLineString(
                 new InvocationTargetException(new RuntimeException("message")), false);
         assertThat(trace).as("case 1").startsWith("message (StaticUtilsTestCase.java");
@@ -214,7 +214,7 @@
     }
 
     @Test
-    public void testStackTraceToSingleLineDebugIsTrue() throws Exception {
+    public void testStackTraceToSingleLineFullStack() throws Exception {
         String trace = stackTraceToSingleLineString(
                 new InvocationTargetException(new RuntimeException("message")), true);
         assertThat(trace).as("case 1").startsWith(

--
Gitblit v1.10.0