Skip to content

Commit af7b0d7

Browse files
committed
Check the class object not its name.
1 parent 9f22ad5 commit af7b0d7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/java/org/apache/ibatis/mapping/CacheBuilder.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ public Cache build() {
8585
setDefaultImplementations();
8686
Cache cache = newBaseCacheInstance(implementation, id);
8787
setCacheProperties(cache);
88-
// issue #352, do not apply decorators to custom caches
89-
if (cache.getClass().getName().startsWith("org.apache.ibatis")) {
88+
if (PerpetualCache.class.equals(cache.getClass())) { // issue #352, do not apply decorators to custom caches
9089
for (Class<? extends Cache> decorator : decorators) {
9190
cache = newCacheDecoratorInstance(decorator, cache);
9291
setCacheProperties(cache);

0 commit comments

Comments
 (0)