Minor - remove StringUtils#getStackTrace

- Remove StringUtils#getStackTrace in favor of Guava's Throwables#getStackTraceAsString
This commit is contained in:
ljacqu
2015-12-26 18:01:09 +01:00
parent 41e400e9dd
commit 5ab3a1f9ef
2 changed files with 1 additions and 35 deletions
@@ -4,8 +4,6 @@ import net.ricecode.similarity.LevenshteinDistanceStrategy;
import net.ricecode.similarity.StringSimilarityService;
import net.ricecode.similarity.StringSimilarityServiceImpl;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.Arrays;
/**
@@ -108,25 +106,6 @@ public final class StringUtils {
return join(delimiter, Arrays.asList(elements));
}
/**
* Get a full stack trace of an exception as a string.
*
* @param exception The exception.
*
* @return Stack trace as a string.
*/
public static String getStackTrace(Exception exception) {
// Create a string and print writer to print the stack trace into
StringWriter stringWriter = new StringWriter();
PrintWriter printWriter = new PrintWriter(stringWriter);
// Print the stack trace into the print writer
exception.printStackTrace(printWriter);
// Return the result as a string
return stringWriter.toString();
}
/**
* Format the information from a Throwable as string, retaining the type and its message.
*