Skip to content

Commit 20d0221

Browse files
mdeinumjhoeller
authored andcommitted
Use an import instead of FQCN
No that JCacheCache extends AbstractValueAdaptingCache instead of directly implementing Cache an import statement can be used in favor of using the FQCN for the field and constructor arguments.
1 parent df51ff0 commit 20d0221

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

spring-context-support/src/main/java/org/springframework/cache/jcache/JCacheCache.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
package org.springframework.cache.jcache;
1818

1919
import java.util.concurrent.Callable;
20+
21+
import javax.cache.Cache;
2022
import javax.cache.processor.EntryProcessor;
2123
import javax.cache.processor.EntryProcessorException;
2224
import javax.cache.processor.MutableEntry;
@@ -37,14 +39,14 @@
3739
*/
3840
public class JCacheCache extends AbstractValueAdaptingCache {
3941

40-
private final javax.cache.Cache<Object, Object> cache;
42+
private final Cache<Object, Object> cache;
4143

4244

4345
/**
4446
* Create an {@link org.springframework.cache.jcache.JCacheCache} instance.
4547
* @param jcache backing JCache Cache instance
4648
*/
47-
public JCacheCache(javax.cache.Cache<Object, Object> jcache) {
49+
public JCacheCache(Cache<Object, Object> jcache) {
4850
this(jcache, true);
4951
}
5052

@@ -53,7 +55,7 @@ public JCacheCache(javax.cache.Cache<Object, Object> jcache) {
5355
* @param jcache backing JCache Cache instance
5456
* @param allowNullValues whether to accept and convert null values for this cache
5557
*/
56-
public JCacheCache(javax.cache.Cache<Object, Object> jcache, boolean allowNullValues) {
58+
public JCacheCache(Cache<Object, Object> jcache, boolean allowNullValues) {
5759
super(allowNullValues);
5860
Assert.notNull(jcache, "Cache must not be null");
5961
this.cache = jcache;
@@ -66,7 +68,7 @@ public final String getName() {
6668
}
6769

6870
@Override
69-
public final javax.cache.Cache<Object, Object> getNativeCache() {
71+
public final Cache<Object, Object> getNativeCache() {
7072
return this.cache;
7173
}
7274

spring-context-support/src/main/java/org/springframework/cache/jcache/JCacheCacheManager.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
public class JCacheCacheManager extends AbstractTransactionSupportingCacheManager {
4040

4141
@Nullable
42-
private javax.cache.CacheManager cacheManager;
42+
private CacheManager cacheManager;
4343

4444
private boolean allowNullValues = true;
4545

@@ -63,15 +63,15 @@ public JCacheCacheManager(CacheManager cacheManager) {
6363
/**
6464
* Set the backing JCache {@link javax.cache.CacheManager}.
6565
*/
66-
public void setCacheManager(@Nullable javax.cache.CacheManager cacheManager) {
66+
public void setCacheManager(@Nullable CacheManager cacheManager) {
6767
this.cacheManager = cacheManager;
6868
}
6969

7070
/**
7171
* Return the backing JCache {@link javax.cache.CacheManager}.
7272
*/
7373
@Nullable
74-
public javax.cache.CacheManager getCacheManager() {
74+
public CacheManager getCacheManager() {
7575
return this.cacheManager;
7676
}
7777

0 commit comments

Comments
 (0)