Skip to content

Commit b233e14

Browse files
committed
Remove Utility#makeStackTrace deprecated method
References #418
1 parent 65ebe9b commit b233e14

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

src/main/java/com/rabbitmq/utility/Utility.java

-18
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515

1616
package com.rabbitmq.utility;
1717

18-
import java.io.ByteArrayOutputStream;
19-
import java.io.PrintStream;
2018
import java.util.ArrayList;
2119
import java.util.Collections;
2220
import java.util.LinkedHashMap;
@@ -74,22 +72,6 @@ public static <T extends Throwable & SensibleClone<T>> T fixStackTrace(T throwab
7472
throwable.setStackTrace(newTrace);
7573
return throwable;
7674
}
77-
78-
/**
79-
*
80-
* @param throwable
81-
* @return
82-
* @deprecated use logging library instead for logging stack traces somewhere
83-
*/
84-
public static String makeStackTrace(Throwable throwable) {
85-
ByteArrayOutputStream baOutStream = new ByteArrayOutputStream();
86-
PrintStream printStream = new PrintStream(baOutStream, false);
87-
throwable.printStackTrace(printStream);
88-
printStream.flush(); // since we don't automatically do so
89-
String text = baOutStream.toString();
90-
printStream.close(); // closes baOutStream
91-
return text;
92-
}
9375

9476
/**
9577
* Synchronizes on the list and then returns a copy of the list that is safe to iterate over. Useful when wanting to do thread-safe iteration over

0 commit comments

Comments
 (0)