add other printStackTrace methods to forbidden-apis-check
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1723960 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8d033e235c
commit
b3b4ed6564
@ -100,47 +100,4 @@ public class HPSFRuntimeException extends RuntimeException
|
|||||||
{
|
{
|
||||||
return reason;
|
return reason;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// /**
|
|
||||||
// * @see Throwable#printStackTrace()
|
|
||||||
// */
|
|
||||||
// public void printStackTrace()
|
|
||||||
// {
|
|
||||||
// printStackTrace(System.err);
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// /**
|
|
||||||
// * @see Throwable#printStackTrace(java.io.PrintStream)
|
|
||||||
// */
|
|
||||||
// public void printStackTrace(final PrintStream p)
|
|
||||||
// {
|
|
||||||
// final Throwable reason = getReason();
|
|
||||||
// super.printStackTrace(p);
|
|
||||||
// if (reason != null)
|
|
||||||
// {
|
|
||||||
// p.println("Caused by:");
|
|
||||||
// reason.printStackTrace(p);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// /**
|
|
||||||
// * @see Throwable#printStackTrace(java.io.PrintWriter)
|
|
||||||
// */
|
|
||||||
// public void printStackTrace(final PrintWriter p)
|
|
||||||
// {
|
|
||||||
// final Throwable reason = getReason();
|
|
||||||
// super.printStackTrace(p);
|
|
||||||
// if (reason != null)
|
|
||||||
// {
|
|
||||||
// p.println("Caused by:");
|
|
||||||
// reason.printStackTrace(p);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,8 @@ import java.io.StringWriter;
|
|||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
import org.apache.poi.util.SuppressForbidden;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>Provides various static utility methods.</p>
|
* <p>Provides various static utility methods.</p>
|
||||||
*
|
*
|
||||||
@ -332,6 +334,7 @@ public class Util
|
|||||||
* @return a string containing the output of a call to
|
* @return a string containing the output of a call to
|
||||||
* <code>t.printStacktrace()</code>.
|
* <code>t.printStacktrace()</code>.
|
||||||
*/
|
*/
|
||||||
|
@SuppressForbidden("uses printStackTrace")
|
||||||
public static String toString(final Throwable t)
|
public static String toString(final Throwable t)
|
||||||
{
|
{
|
||||||
final StringWriter sw = new StringWriter();
|
final StringWriter sw = new StringWriter();
|
||||||
|
@ -57,6 +57,7 @@ public class SystemOutLogger extends POILogger
|
|||||||
* @param obj1 The object to log. This is converted to a string.
|
* @param obj1 The object to log. This is converted to a string.
|
||||||
* @param exception An exception to be logged
|
* @param exception An exception to be logged
|
||||||
*/
|
*/
|
||||||
|
@SuppressForbidden("uses printStackTrace")
|
||||||
public void log(final int level, final Object obj1,
|
public void log(final int level, final Object obj1,
|
||||||
final Throwable exception) {
|
final Throwable exception) {
|
||||||
if (check(level)) {
|
if (check(level)) {
|
||||||
|
@ -28,3 +28,5 @@
|
|||||||
|
|
||||||
java.lang.System#gc() @ Please do not try to stop the world
|
java.lang.System#gc() @ Please do not try to stop the world
|
||||||
java.lang.Throwable#printStackTrace() @ Please use POILogger for exceptions
|
java.lang.Throwable#printStackTrace() @ Please use POILogger for exceptions
|
||||||
|
java.lang.Throwable#printStackTrace(java.io.PrintStream) @ Please use POILogger for exceptions
|
||||||
|
java.lang.Throwable#printStackTrace(java.io.PrintWriter) @ Please use POILogger for exceptions
|
Loading…
Reference in New Issue
Block a user