Class Closer.LoggingSuppressor

  • All Implemented Interfaces:
    Closer.Suppressor
    Enclosing class:
    Closer

    static final class Closer.LoggingSuppressor
    extends java.lang.Object
    implements Closer.Suppressor
    Suppresses exceptions by logging them.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void suppress​(java.io.Closeable closeable, java.lang.Throwable thrown, java.lang.Throwable suppressed)
      Suppresses the given exception (suppressed) which was thrown when attempting to close the given closeable.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LoggingSuppressor

        LoggingSuppressor()
    • Method Detail

      • suppress

        public void suppress​(java.io.Closeable closeable,
                             java.lang.Throwable thrown,
                             java.lang.Throwable suppressed)
        Description copied from interface: Closer.Suppressor
        Suppresses the given exception (suppressed) which was thrown when attempting to close the given closeable. thrown is the exception that is actually being thrown from the method. Implementations of this method should not throw under any circumstances.
        Specified by:
        suppress in interface Closer.Suppressor