Tomcat reports leak due to UserIdPrincipal not destroying ThreadLocal upon stopping
I run a web application that includes flowable inside an Apache Tomcat servlet container running under Linux debian.
When reloading the application multiple errors identical to this one are reported in tomcat's catalina.out.
[2023-02-28 10:18:28] [crit] The web application [my-application] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@6641b2af]) and a value of type [org.flowable.common.engine.impl.identity.UserIdPrincipal] (value [org.flowable.common.engine.impl.identity.UserIdPrincipal@7342689d]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
My web app uses flowable 7.0.0.M1 installed from maven. I run tomcat 10.1.6 under debian 12 (bookworm).