]> source.dussan.org Git - poi.git/commitdiff
add other printStackTrace methods to forbidden-apis-check
authorAndreas Beeker <kiwiwings@apache.org>
Sun, 10 Jan 2016 19:52:16 +0000 (19:52 +0000)
committerAndreas Beeker <kiwiwings@apache.org>
Sun, 10 Jan 2016 19:52:16 +0000 (19:52 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1723960 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/hpsf/HPSFRuntimeException.java
src/java/org/apache/poi/hpsf/Util.java
src/java/org/apache/poi/util/SystemOutLogger.java
src/resources/devtools/forbidden-signatures-prod.txt

index 203498f13ca69ec3577186bececd9ba82187010d..7f3fa1fa1ae802589c756be6f7566cf48b41366e 100644 (file)
@@ -100,47 +100,4 @@ public class HPSFRuntimeException extends RuntimeException
     {
         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);
-//        }
-//    }
-
 }
index 62a384a3dd785aedea0ede311ef7a533ca7e8974..57ae6e2d2327c7645a22e9fa40bb26be3a8fcdd3 100644 (file)
@@ -23,6 +23,8 @@ import java.io.StringWriter;
 import java.util.Collection;
 import java.util.Date;
 
+import org.apache.poi.util.SuppressForbidden;
+
 /**
  * <p>Provides various static utility methods.</p>
  *
@@ -332,6 +334,7 @@ public class Util
      * @return a string containing the output of a call to
      * <code>t.printStacktrace()</code>.
      */
+    @SuppressForbidden("uses printStackTrace")
     public static String toString(final Throwable t)
     {
         final StringWriter sw = new StringWriter();
index 78043342731b55f1f5f8de2c4498526325b5ba3e..a13882f56da0f4fe02a8eb59d9c8414f62ce8a13 100644 (file)
@@ -57,6 +57,7 @@ public class SystemOutLogger extends POILogger
      * @param obj1 The object to log.  This is converted to a string.
      * @param exception An exception to be logged
      */
+    @SuppressForbidden("uses printStackTrace")
     public void log(final int level, final Object obj1,
                     final Throwable exception) {
         if (check(level)) {
index bc63b5b3c77030e21144f929ed159076b6234cd5..59dcf4789002bca4b983249bf2b9b38ad9a6b3bc 100644 (file)
@@ -28,3 +28,5 @@
 
 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(java.io.PrintStream) @ Please use POILogger for exceptions
+java.lang.Throwable#printStackTrace(java.io.PrintWriter) @ Please use POILogger for exceptions
\ No newline at end of file