File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
src/main/java/org/apache/ibatis/cache/decorators Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2009-2021 the original author or authors.
2
+ * Copyright 2009-2022 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.
@@ -87,7 +87,9 @@ public Object getObject(Object key) {
87
87
@ Override
88
88
public Object removeObject (Object key ) {
89
89
removeGarbageCollectedItems ();
90
- return delegate .removeObject (key );
90
+ @ SuppressWarnings ("unchecked" )
91
+ SoftReference <Object > softReference = (SoftReference <Object >) delegate .removeObject (key );
92
+ return softReference == null ? null : softReference .get ();
91
93
}
92
94
93
95
@ Override
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2009-2021 the original author or authors.
2
+ * Copyright 2009-2022 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.
@@ -86,7 +86,9 @@ public Object getObject(Object key) {
86
86
@ Override
87
87
public Object removeObject (Object key ) {
88
88
removeGarbageCollectedItems ();
89
- return delegate .removeObject (key );
89
+ @ SuppressWarnings ("unchecked" )
90
+ WeakReference <Object > weakReference = (WeakReference <Object >) delegate .removeObject (key );
91
+ return weakReference == null ? null : weakReference .get ();
90
92
}
91
93
92
94
@ Override
You can’t perform that action at this time.
0 commit comments