Calling org.apache.tomcat.util.modeler.Registry.disableRegistry() assigns an instance of NoDescriptorRegistry to the static registry field. Subsequent invocations then log a warning that states that the registry cannot be disabled as it has already been initialised. These feels like a false-positive to me when registry is an instance of NoDescriptorRegistry. To avoid the unwanted warning, could the check be changed to something like the following: if (registry == null) { registry = new NoDescriptorRegistry(); } else if (!registry instanceof NoDescriptorRegistry) { log.warn(sm.getString("registry.noDisable")); } This would improve log output in integration tests using embedded Tomcat where Tomcat may be initialised multiple times.
Thanks for the report and the suggested fix. Works for me. Fixed in: - master for 9.0.30 onwards
Thanks, Mark. Much appreciated.