Skip to content

Commit 2445766

Browse files
authored
Ensure Spring LogFactory contains all public methods from Apache LogFactory (#30668)
1 parent f1fb8cf commit 2445766

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

spring-jcl/src/main/java/org/apache/commons/logging/LogFactory.java

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,31 @@ public Log getInstance(String name) {
102102
return getLog(name);
103103
}
104104

105+
// Just in case some code happens to call uncommon Commons Logging methods...
106+
107+
@Deprecated
108+
public Object getAttribute(String name) {
109+
return null;
110+
}
111+
112+
@Deprecated
113+
public String[] getAttributeNames() {
114+
return new String[0];
115+
}
116+
117+
@Deprecated
118+
public void removeAttribute(String name) {
119+
// do nothing
120+
}
121+
122+
@Deprecated
123+
public void setAttribute(String name, Object value) {
124+
// do nothing
125+
}
126+
127+
@Deprecated
128+
public void release() {
129+
// do nothing
130+
}
131+
105132
}

0 commit comments

Comments
 (0)