From 24457660e3841f7989afd8863485334ba745513e Mon Sep 17 00:00:00 2001 From: Maarten Coene <4728619+maartenc@users.noreply.github.com> Date: Wed, 21 Jun 2023 09:29:58 +0200 Subject: [PATCH] Ensure Spring `LogFactory` contains all public methods from Apache `LogFactory` (#30668) --- .../apache/commons/logging/LogFactory.java | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/spring-jcl/src/main/java/org/apache/commons/logging/LogFactory.java b/spring-jcl/src/main/java/org/apache/commons/logging/LogFactory.java index 0600afc8aa2c..15b5636c43aa 100644 --- a/spring-jcl/src/main/java/org/apache/commons/logging/LogFactory.java +++ b/spring-jcl/src/main/java/org/apache/commons/logging/LogFactory.java @@ -102,4 +102,31 @@ public Log getInstance(String name) { return getLog(name); } + // Just in case some code happens to call uncommon Commons Logging methods... + + @Deprecated + public Object getAttribute(String name) { + return null; + } + + @Deprecated + public String[] getAttributeNames() { + return new String[0]; + } + + @Deprecated + public void removeAttribute(String name) { + // do nothing + } + + @Deprecated + public void setAttribute(String name, Object value) { + // do nothing + } + + @Deprecated + public void release() { + // do nothing + } + }