File tree Expand file tree Collapse file tree 2 files changed +49
-5
lines changed
spring-jcl/src/main/java/org/apache/commons/logging Expand file tree Collapse file tree 2 files changed +49
-5
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2019 the original author or authors.
2
+ * Copyright 2002-2023 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -102,4 +102,47 @@ public Log getInstance(String name) {
102
102
return getLog (name );
103
103
}
104
104
105
+
106
+ // Just in case some code happens to call uncommon Commons Logging methods...
107
+
108
+ @ Deprecated
109
+ public Object getAttribute (String name ) {
110
+ return null ;
111
+ }
112
+
113
+ @ Deprecated
114
+ public String [] getAttributeNames () {
115
+ return new String [0 ];
116
+ }
117
+
118
+ @ Deprecated
119
+ public void removeAttribute (String name ) {
120
+ // do nothing
121
+ }
122
+
123
+ @ Deprecated
124
+ public void setAttribute (String name , Object value ) {
125
+ // do nothing
126
+ }
127
+
128
+ @ Deprecated
129
+ public void release () {
130
+ // do nothing
131
+ }
132
+
133
+ @ Deprecated
134
+ public static void release (ClassLoader classLoader ) {
135
+ // do nothing
136
+ }
137
+
138
+ @ Deprecated
139
+ public static void releaseAll () {
140
+ // do nothing
141
+ }
142
+
143
+ @ Deprecated
144
+ public static String objectId (Object o ) {
145
+ return (o == null ? "null" : o .getClass ().getName () + "@" + System .identityHashCode (o ));
146
+ }
147
+
105
148
}
Original file line number Diff line number Diff line change @@ -47,8 +47,9 @@ public Log getInstance(String name) {
47
47
}
48
48
49
49
50
- // Just in case some code happens to call uncommon Commons Logging methods ...
50
+ // Just in case some code happens to rely on Commons Logging attributes ...
51
51
52
+ @ Override
52
53
public void setAttribute (String name , Object value ) {
53
54
if (value != null ) {
54
55
this .attributes .put (name , value );
@@ -58,19 +59,19 @@ public void setAttribute(String name, Object value) {
58
59
}
59
60
}
60
61
62
+ @ Override
61
63
public void removeAttribute (String name ) {
62
64
this .attributes .remove (name );
63
65
}
64
66
67
+ @ Override
65
68
public Object getAttribute (String name ) {
66
69
return this .attributes .get (name );
67
70
}
68
71
72
+ @ Override
69
73
public String [] getAttributeNames () {
70
74
return this .attributes .keySet ().toArray (new String [0 ]);
71
75
}
72
76
73
- public void release () {
74
- }
75
-
76
77
}
You can’t perform that action at this time.
0 commit comments