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 @@ -53,8 +53,9 @@ public Log getInstance(String name) {
53
53
}
54
54
55
55
56
- // Just in case some code happens to call uncommon Commons Logging methods ...
56
+ // Just in case some code happens to rely on Commons Logging attributes ...
57
57
58
+ @ Override
58
59
public void setAttribute (String name , Object value ) {
59
60
if (value != null ) {
60
61
this .attributes .put (name , value );
@@ -64,19 +65,19 @@ public void setAttribute(String name, Object value) {
64
65
}
65
66
}
66
67
68
+ @ Override
67
69
public void removeAttribute (String name ) {
68
70
this .attributes .remove (name );
69
71
}
70
72
73
+ @ Override
71
74
public Object getAttribute (String name ) {
72
75
return this .attributes .get (name );
73
76
}
74
77
78
+ @ Override
75
79
public String [] getAttributeNames () {
76
80
return this .attributes .keySet ().toArray (new String [0 ]);
77
81
}
78
82
79
- public void release () {
80
- }
81
-
82
83
}
You can’t perform that action at this time.
0 commit comments