private int decrementAndGetCount()

in log4j-jakarta-web/src/main/java/org/apache/logging/log4j/web/Log4jServletContextListener.java [58:68]


    private int decrementAndGetCount() {
        Integer count = (Integer) servletContext.getAttribute(START_COUNT_ATTR);
        if (count == null) {
            LOGGER.warn(
                    "{} received a 'contextDestroyed' message without a corresponding 'contextInitialized' message.",
                    getClass().getName());
            count = 1;
        }
        servletContext.setAttribute(START_COUNT_ATTR, --count);
        return count;
    }