The check for length in https://github.com/qos-ch/logback/blob/v_1.2.11/logback-classic/src/main/java/ch/qos/logback/classic/spi/ThrowableProxy.java#L99 can be reached with the implementation of extractSupressedThrowables that supports returning null so there is a theoretical path there, but dunno if it in reality ever will hit anything other than https://github.com/qos-ch/logback/blob/v_1.2.11/logback-classic/src/main/java/ch/qos/logback/classic/spi/ThrowableProxy.java#L122. A mocked object is not a normal throwable and the implementation of Throwable.getSupressed() listed below will never return null like the mock did.
|