Just switching from mockito-core
to mockito-inline
(4.11.0), without any code changes, causes logback-classic (1.2.11) to throw
Caused by: java.lang.NullPointerException: Cannot read the array length because "throwableSuppressed" is null
at ch.qos.logback.classic.spi.ThrowableProxy.<init>(ThrowableProxy.java:99)
at ch.qos.logback.classic.spi.ThrowableProxy.<init>(ThrowableProxy.java:62)
at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:119)
at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:419)
at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:383)
at ch.qos.logback.classic.Logger.warn(Logger.java:704)
the log line is
LOG.warn(
"{} while registering RIC {}, will retry once: {}",
oe.getClass().getSimpleName(), ric, oe.toString(), oe);
Any ideas how to fix this?
Changing the args to
oe.getClass().getSimpleName(), ric, oe.toString()
works around the issue but you loose the stacktrace in the logs, and I'd hate to loose that in production just to work around an issue in the tests.
Changing the args to
oe.getClass().getSimpleName(), ric, oe
or oe.getClass().getSimpleName(), ric, oe, oe
does not work.