This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-jcs.git
commit 78e5a2ef37febb1077cb1b34c61b6602638fbaaa Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Mon Oct 9 10:23:53 2023 -0400 Use Checkstyle to validate import order --- checkstyle.xml | 6 +++ .../commons/jcs3/ConcurrentRemovalLoadTest.java | 8 ++-- .../apache/commons/jcs3/TestTCPLateralCache.java | 6 +-- .../block/BlockDiskCacheConcurrentUnitTest.java | 10 ++-- ...BlockDiskCacheSameRegionConcurrentUnitTest.java | 8 ++-- ...dexedDiskCacheConcurrentNoDeadLockUnitTest.java | 8 ++-- .../IndexedDiskCacheConcurrentUnitTest.java | 10 ++-- .../indexed/IndexedDiskCacheNoMemoryUnitTest.java | 8 ++-- ...dexedDiskCacheSameRegionConcurrentUnitTest.java | 8 ++-- .../jdbc/hsql/HSQLDiskCacheConcurrentUnitTest.java | 10 ++-- .../tcp/LateralTCPNoDeadLockConcurrentTest.java | 8 ++-- .../jcs3/engine/EventQueueConcurrentLoadTest.java | 8 ++-- .../lru/LHMLRUMemoryCacheConcurrentUnitTest.java | 12 ++--- .../lru/LRUMemoryCacheConcurrentUnitTest.java | 8 ++-- .../utils/struct/LRUMapConcurrentUnitTest.java | 4 +- .../jcs3/jcache/extras/cdi/CacheManagerBean.java | 13 +++--- .../jcs3/jcache/extras/cdi/CacheProviderBean.java | 13 +++--- .../jcache/extras/cdi/ExtraJCacheExtension.java | 3 +- .../jcache/extras/loader/CacheLoaderAdapter.java | 5 +- .../jcache/extras/loader/CompositeCacheLoader.java | 12 ++--- .../jcs3/jcache/extras/web/InMemoryResponse.java | 1 + .../jcache/extras/writer/AsyncCacheWriter.java | 9 ++-- .../jcache/extras/writer/CacheWriterAdapter.java | 3 +- .../jcache/extras/writer/CompositeCacheWriter.java | 8 ++-- .../jcs3/jcache/extras/InternalCacheRule.java | 9 ++-- .../extras/cdi/ExtraJCacheExtensionTest.java | 12 ++--- .../extras/loader/CacheLoaderAdapterTest.java | 17 +++---- .../extras/loader/CompositeCacheLoaderTest.java | 11 +++-- .../extras/writer/CacheWriterAdapterTest.java | 21 +++++---- .../extras/writer/CompositeCacheWriterTest.java | 15 +++--- .../jcache/openjpa/OpenJPAJCacheDataCache.java | 11 +++-- .../jcache/openjpa/OpenJPAJCacheDerivation.java | 4 +- .../jcache/openjpa/OpenJPAJCacheQueryCache.java | 15 +++--- .../commons/jcs3/jcache/OWBBeanProvider.java | 9 ++-- .../commons/jcs3/jcache/JCSCachingProvider.java | 7 +-- .../commons/jcs3/jcache/JCSConfiguration.java | 7 +-- .../commons/jcs3/jcache/TempStateCacheView.java | 20 ++++---- .../jcache/cdi/CacheInvocationParameterImpl.java | 3 +- .../jcs3/jcache/cdi/CacheKeyGeneratorImpl.java | 3 +- .../jcs3/jcache/cdi/CacheMethodDetailsImpl.java | 5 +- .../jcs3/jcache/cdi/CacheResolverFactoryImpl.java | 3 +- .../commons/jcs3/jcache/cdi/CacheResolverImpl.java | 3 +- .../jcs3/jcache/cdi/CacheResultInterceptor.java | 1 + .../jcs3/jcache/cdi/GeneratedCacheKeyImpl.java | 3 +- .../cdi/MakeJCacheCDIInterceptorFriendly.java | 5 +- .../jmx/ConfigurableMBeanServerIdBuilder.java | 5 +- .../org/apache/commons/jcs3/jcache/jmx/JMXs.java | 3 +- .../org/apache/commons/jcs3/jcache/CacheTest.java | 53 +++++++++++----------- .../commons/jcs3/jcache/CachingProviderTest.java | 10 ++-- .../commons/jcs3/jcache/NotSerializableTest.java | 8 ++-- .../jcs3/jcache/cdi/CDIJCacheHelperTest.java | 7 +-- .../jcs/auxiliary/disk/file/FileDiskCache.java | 16 +++---- .../disk/file/FileDiskCacheAttributes.java | 21 +-------- .../auxiliary/disk/file/FileDiskCacheFactory.java | 33 +++----------- .../auxiliary/disk/file/FileDiskCacheManager.java | 8 ++-- .../disk/file/FileDiskCacheFactoryUnitTest.java | 12 ++--- .../auxiliary/disk/file/FileDiskCacheUnitTest.java | 11 +++-- 57 files changed, 279 insertions(+), 281 deletions(-) diff --git a/checkstyle.xml b/checkstyle.xml index b4246c1f..10abc992 100644 --- a/checkstyle.xml +++ b/checkstyle.xml @@ -164,6 +164,12 @@ </module> <module name="TodoComment" /> <module name="UpperEll" /> + <module name="ImportOrder"> + <property name="option" value="top"/> + <property name="groups" value="java,javax,org"/> + <property name="ordered" value="true"/> + <property name="separated" value="true"/> + </module> </module> diff --git a/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/ConcurrentRemovalLoadTest.java b/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/ConcurrentRemovalLoadTest.java index 7250425f..6a401178 100644 --- a/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/ConcurrentRemovalLoadTest.java +++ b/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/ConcurrentRemovalLoadTest.java @@ -1,5 +1,9 @@ package org.apache.commons.jcs3; +import junit.extensions.ActiveTestSuite; +import junit.framework.Test; +import junit.framework.TestCase; + /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -21,10 +25,6 @@ package org.apache.commons.jcs3; import org.junit.Before; -import junit.extensions.ActiveTestSuite; -import junit.framework.Test; -import junit.framework.TestCase; - /** * Test which exercises the hierarchical removal when the cache is active. */ diff --git a/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/TestTCPLateralCache.java b/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/TestTCPLateralCache.java index a5832358..5b736f52 100644 --- a/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/TestTCPLateralCache.java +++ b/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/TestTCPLateralCache.java @@ -3,9 +3,6 @@ package org.apache.commons.jcs3; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; -import org.apache.commons.jcs3.access.CacheAccess; -import org.junit.Before; - /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -29,6 +26,9 @@ import junit.extensions.ActiveTestSuite; import junit.framework.Test; import junit.framework.TestCase; +import org.apache.commons.jcs3.access.CacheAccess; +import org.junit.Before; + /** * Test which exercises the indexed disk cache. This one uses three different * regions for three threads. diff --git a/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/block/BlockDiskCacheConcurrentUnitTest.java b/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/block/BlockDiskCacheConcurrentUnitTest.java index 0c5aacf1..94b1c7e0 100644 --- a/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/block/BlockDiskCacheConcurrentUnitTest.java +++ b/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/block/BlockDiskCacheConcurrentUnitTest.java @@ -8,11 +8,6 @@ import java.util.HashSet; import java.util.Map; import java.util.Set; -import org.apache.commons.jcs3.JCS; -import org.apache.commons.jcs3.access.CacheAccess; -import org.apache.commons.jcs3.engine.behavior.ICacheElement; -import org.junit.Before; - /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -36,6 +31,11 @@ import junit.extensions.ActiveTestSuite; import junit.framework.Test; import junit.framework.TestCase; +import org.apache.commons.jcs3.JCS; +import org.apache.commons.jcs3.access.CacheAccess; +import org.apache.commons.jcs3.engine.behavior.ICacheElement; +import org.junit.Before; + /** * Test which exercises the block disk cache. This one uses three different * regions for three threads. diff --git a/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/block/BlockDiskCacheSameRegionConcurrentUnitTest.java b/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/block/BlockDiskCacheSameRegionConcurrentUnitTest.java index 16c8ed1a..24ae4b1a 100644 --- a/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/block/BlockDiskCacheSameRegionConcurrentUnitTest.java +++ b/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/block/BlockDiskCacheSameRegionConcurrentUnitTest.java @@ -26,14 +26,14 @@ import java.util.HashSet; import java.util.Map; import java.util.Set; -import org.apache.commons.jcs3.JCS; -import org.apache.commons.jcs3.access.CacheAccess; -import org.apache.commons.jcs3.engine.behavior.ICacheElement; - import junit.extensions.ActiveTestSuite; import junit.framework.Test; import junit.framework.TestCase; +import org.apache.commons.jcs3.JCS; +import org.apache.commons.jcs3.access.CacheAccess; +import org.apache.commons.jcs3.engine.behavior.ICacheElement; + /** * Test which exercises the block disk cache. Runs four threads against the same region. */ diff --git a/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/indexed/IndexedDiskCacheConcurrentNoDeadLockUnitTest.java b/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/indexed/IndexedDiskCacheConcurrentNoDeadLockUnitTest.java index 0493ebde..f77fdc28 100644 --- a/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/indexed/IndexedDiskCacheConcurrentNoDeadLockUnitTest.java +++ b/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/indexed/IndexedDiskCacheConcurrentNoDeadLockUnitTest.java @@ -1,9 +1,5 @@ package org.apache.commons.jcs3.auxiliary.disk.indexed; -import org.apache.commons.jcs3.JCS; -import org.junit.After; -import org.junit.Before; - /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -27,6 +23,10 @@ import junit.extensions.ActiveTestSuite; import junit.framework.Test; import junit.framework.TestCase; +import org.apache.commons.jcs3.JCS; +import org.junit.After; +import org.junit.Before; + /** * Test which exercises the indexed disk cache. Runs three threads against the * same region. diff --git a/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/indexed/IndexedDiskCacheConcurrentUnitTest.java b/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/indexed/IndexedDiskCacheConcurrentUnitTest.java index 934acec6..149ac8a4 100644 --- a/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/indexed/IndexedDiskCacheConcurrentUnitTest.java +++ b/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/indexed/IndexedDiskCacheConcurrentUnitTest.java @@ -27,11 +27,6 @@ import java.util.HashSet; import java.util.Map; import java.util.Set; -import org.apache.commons.jcs3.JCS; -import org.apache.commons.jcs3.access.CacheAccess; -import org.apache.commons.jcs3.engine.behavior.ICacheElement; -import org.junit.Before; - /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -55,6 +50,11 @@ import junit.extensions.ActiveTestSuite; import junit.framework.Test; import junit.framework.TestCase; +import org.apache.commons.jcs3.JCS; +import org.apache.commons.jcs3.access.CacheAccess; +import org.apache.commons.jcs3.engine.behavior.ICacheElement; +import org.junit.Before; + /** * Test which exercises the indexed disk cache. This one uses three different * regions for thre threads. diff --git a/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/indexed/IndexedDiskCacheNoMemoryUnitTest.java b/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/indexed/IndexedDiskCacheNoMemoryUnitTest.java index b7821083..739c67ef 100644 --- a/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/indexed/IndexedDiskCacheNoMemoryUnitTest.java +++ b/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/indexed/IndexedDiskCacheNoMemoryUnitTest.java @@ -27,14 +27,14 @@ import java.util.HashSet; import java.util.Map; import java.util.Set; -import org.apache.commons.jcs3.JCS; -import org.apache.commons.jcs3.access.CacheAccess; -import org.apache.commons.jcs3.engine.behavior.ICacheElement; - import junit.extensions.ActiveTestSuite; import junit.framework.Test; import junit.framework.TestCase; +import org.apache.commons.jcs3.JCS; +import org.apache.commons.jcs3.access.CacheAccess; +import org.apache.commons.jcs3.engine.behavior.ICacheElement; + /** * Test which exercises the indexed disk cache. This one uses three different * regions for three threads. It uses a config file that specifies 0 items in diff --git a/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/indexed/IndexedDiskCacheSameRegionConcurrentUnitTest.java b/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/indexed/IndexedDiskCacheSameRegionConcurrentUnitTest.java index 32e9755a..1bd56ecd 100644 --- a/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/indexed/IndexedDiskCacheSameRegionConcurrentUnitTest.java +++ b/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/indexed/IndexedDiskCacheSameRegionConcurrentUnitTest.java @@ -26,14 +26,14 @@ import java.util.HashSet; import java.util.Map; import java.util.Set; -import org.apache.commons.jcs3.JCS; -import org.apache.commons.jcs3.access.CacheAccess; -import org.apache.commons.jcs3.engine.behavior.ICacheElement; - import junit.extensions.ActiveTestSuite; import junit.framework.Test; import junit.framework.TestCase; +import org.apache.commons.jcs3.JCS; +import org.apache.commons.jcs3.access.CacheAccess; +import org.apache.commons.jcs3.engine.behavior.ICacheElement; + /** * Test which exercises the indexed disk cache. Runs three threads against the * same region. diff --git a/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/jdbc/hsql/HSQLDiskCacheConcurrentUnitTest.java b/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/jdbc/hsql/HSQLDiskCacheConcurrentUnitTest.java index a6a437f3..20d11707 100644 --- a/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/jdbc/hsql/HSQLDiskCacheConcurrentUnitTest.java +++ b/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/auxiliary/disk/jdbc/hsql/HSQLDiskCacheConcurrentUnitTest.java @@ -8,11 +8,6 @@ import java.util.HashSet; import java.util.Map; import java.util.Set; -import org.apache.commons.jcs3.JCS; -import org.apache.commons.jcs3.access.CacheAccess; -import org.apache.commons.jcs3.engine.behavior.ICacheElement; -import org.junit.Before; - /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -36,6 +31,11 @@ import junit.extensions.ActiveTestSuite; import junit.framework.Test; import junit.framework.TestCase; +import org.apache.commons.jcs3.JCS; +import org.apache.commons.jcs3.access.CacheAccess; +import org.apache.commons.jcs3.engine.behavior.ICacheElement; +import org.junit.Before; + /** * Test which exercises the indexed disk cache. This one uses three different regions for thre * threads. diff --git a/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/auxiliary/lateral/socket/tcp/LateralTCPNoDeadLockConcurrentTest.java b/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/auxiliary/lateral/socket/tcp/LateralTCPNoDeadLockConcurrentTest.java index aa8a297c..1a651800 100644 --- a/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/auxiliary/lateral/socket/tcp/LateralTCPNoDeadLockConcurrentTest.java +++ b/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/auxiliary/lateral/socket/tcp/LateralTCPNoDeadLockConcurrentTest.java @@ -1,9 +1,5 @@ package org.apache.commons.jcs3.auxiliary.lateral.socket.tcp; -import org.apache.commons.jcs3.JCS; -import org.junit.After; -import org.junit.Before; - /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -27,6 +23,10 @@ import junit.extensions.ActiveTestSuite; import junit.framework.Test; import junit.framework.TestCase; +import org.apache.commons.jcs3.JCS; +import org.junit.After; +import org.junit.Before; + /** * Test which exercises the tcp lateral cache. Runs two threads against the * same region and two against other regions. diff --git a/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/engine/EventQueueConcurrentLoadTest.java b/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/engine/EventQueueConcurrentLoadTest.java index 6ffc8b09..0ddddfd7 100644 --- a/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/engine/EventQueueConcurrentLoadTest.java +++ b/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/engine/EventQueueConcurrentLoadTest.java @@ -24,14 +24,14 @@ import static org.junit.Assert.assertTrue; import java.io.IOException; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.commons.jcs3.engine.behavior.ICacheElement; -import org.apache.commons.jcs3.engine.behavior.ICacheListener; -import org.junit.Before; - import junit.extensions.ActiveTestSuite; import junit.framework.Test; import junit.framework.TestCase; +import org.apache.commons.jcs3.engine.behavior.ICacheElement; +import org.apache.commons.jcs3.engine.behavior.ICacheListener; +import org.junit.Before; + /** * This test case is designed to makes sure there are no deadlocks in the event queue. The time to * live should be set to a very short interval to make a deadlock more likely. diff --git a/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/engine/memory/lru/LHMLRUMemoryCacheConcurrentUnitTest.java b/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/engine/memory/lru/LHMLRUMemoryCacheConcurrentUnitTest.java index 12039c13..0328f97f 100644 --- a/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/engine/memory/lru/LHMLRUMemoryCacheConcurrentUnitTest.java +++ b/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/engine/memory/lru/LHMLRUMemoryCacheConcurrentUnitTest.java @@ -27,12 +27,6 @@ import java.util.HashSet; import java.util.Map; import java.util.Set; -import org.apache.commons.jcs3.engine.CacheElement; -import org.apache.commons.jcs3.engine.behavior.ICacheElement; -import org.apache.commons.jcs3.engine.control.CompositeCache; -import org.apache.commons.jcs3.engine.control.CompositeCacheManager; -import org.junit.Before; - /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -56,6 +50,12 @@ import junit.extensions.ActiveTestSuite; import junit.framework.Test; import junit.framework.TestCase; +import org.apache.commons.jcs3.engine.CacheElement; +import org.apache.commons.jcs3.engine.behavior.ICacheElement; +import org.apache.commons.jcs3.engine.control.CompositeCache; +import org.apache.commons.jcs3.engine.control.CompositeCacheManager; +import org.junit.Before; + /** * Test which exercises the LRUMemory cache. This one uses three different * regions for three threads. diff --git a/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/engine/memory/lru/LRUMemoryCacheConcurrentUnitTest.java b/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/engine/memory/lru/LRUMemoryCacheConcurrentUnitTest.java index 23e078b3..f7885f46 100644 --- a/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/engine/memory/lru/LRUMemoryCacheConcurrentUnitTest.java +++ b/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/engine/memory/lru/LRUMemoryCacheConcurrentUnitTest.java @@ -27,16 +27,16 @@ import java.util.HashSet; import java.util.Map; import java.util.Set; +import junit.extensions.ActiveTestSuite; +import junit.framework.Test; +import junit.framework.TestCase; + import org.apache.commons.jcs3.engine.CacheElement; import org.apache.commons.jcs3.engine.behavior.ICacheElement; import org.apache.commons.jcs3.engine.control.CompositeCache; import org.apache.commons.jcs3.engine.control.CompositeCacheManager; import org.junit.Before; -import junit.extensions.ActiveTestSuite; -import junit.framework.Test; -import junit.framework.TestCase; - /** * Test which exercises the LRUMemory cache. This one uses three different * regions for three threads. diff --git a/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/utils/struct/LRUMapConcurrentUnitTest.java b/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/utils/struct/LRUMapConcurrentUnitTest.java index ee91122e..a3b8d7da 100644 --- a/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/utils/struct/LRUMapConcurrentUnitTest.java +++ b/commons-jcs3-core/src/test/java/org/apache/commons/jcs3/utils/struct/LRUMapConcurrentUnitTest.java @@ -24,11 +24,11 @@ import static org.junit.Assert.assertNull; import java.util.Iterator; -import org.junit.Test; - import junit.extensions.ActiveTestSuite; import junit.framework.TestCase; +import org.junit.Test; + /** * Tests the LRUMap */ diff --git a/commons-jcs3-jcache-extras/src/main/java/org/apache/commons/jcs3/jcache/extras/cdi/CacheManagerBean.java b/commons-jcs3-jcache-extras/src/main/java/org/apache/commons/jcs3/jcache/extras/cdi/CacheManagerBean.java index e79d9e35..9cc0f612 100644 --- a/commons-jcs3-jcache-extras/src/main/java/org/apache/commons/jcs3/jcache/extras/cdi/CacheManagerBean.java +++ b/commons-jcs3-jcache-extras/src/main/java/org/apache/commons/jcs3/jcache/extras/cdi/CacheManagerBean.java @@ -18,18 +18,19 @@ */ package org.apache.commons.jcs3.jcache.extras.cdi; +import static java.util.Collections.emptySet; + +import java.lang.annotation.Annotation; +import java.lang.reflect.Type; +import java.util.HashSet; +import java.util.Set; + import javax.cache.CacheManager; import javax.enterprise.context.ApplicationScoped; import javax.enterprise.context.spi.CreationalContext; import javax.enterprise.inject.spi.Bean; import javax.enterprise.inject.spi.InjectionPoint; import javax.enterprise.inject.spi.PassivationCapable; -import java.lang.annotation.Annotation; -import java.lang.reflect.Type; -import java.util.HashSet; -import java.util.Set; - -import static java.util.Collections.emptySet; public class CacheManagerBean implements Bean<CacheManager>, PassivationCapable { diff --git a/commons-jcs3-jcache-extras/src/main/java/org/apache/commons/jcs3/jcache/extras/cdi/CacheProviderBean.java b/commons-jcs3-jcache-extras/src/main/java/org/apache/commons/jcs3/jcache/extras/cdi/CacheProviderBean.java index f1889891..3e639d4a 100644 --- a/commons-jcs3-jcache-extras/src/main/java/org/apache/commons/jcs3/jcache/extras/cdi/CacheProviderBean.java +++ b/commons-jcs3-jcache-extras/src/main/java/org/apache/commons/jcs3/jcache/extras/cdi/CacheProviderBean.java @@ -18,18 +18,19 @@ */ package org.apache.commons.jcs3.jcache.extras.cdi; +import static java.util.Collections.emptySet; + +import java.lang.annotation.Annotation; +import java.lang.reflect.Type; +import java.util.HashSet; +import java.util.Set; + import javax.cache.spi.CachingProvider; import javax.enterprise.context.ApplicationScoped; import javax.enterprise.context.spi.CreationalContext; import javax.enterprise.inject.spi.Bean; import javax.enterprise.inject.spi.InjectionPoint; import javax.enterprise.inject.spi.PassivationCapable; -import java.lang.annotation.Annotation; -import java.lang.reflect.Type; -import java.util.HashSet; -import java.util.Set; - -import static java.util.Collections.emptySet; public class CacheProviderBean implements Bean<CachingProvider>, PassivationCapable { diff --git a/commons-jcs3-jcache-extras/src/main/java/org/apache/commons/jcs3/jcache/extras/cdi/ExtraJCacheExtension.java b/commons-jcs3-jcache-extras/src/main/java/org/apache/commons/jcs3/jcache/extras/cdi/ExtraJCacheExtension.java index 97ac289f..1eb75576 100644 --- a/commons-jcs3-jcache-extras/src/main/java/org/apache/commons/jcs3/jcache/extras/cdi/ExtraJCacheExtension.java +++ b/commons-jcs3-jcache-extras/src/main/java/org/apache/commons/jcs3/jcache/extras/cdi/ExtraJCacheExtension.java @@ -18,6 +18,8 @@ */ package org.apache.commons.jcs3.jcache.extras.cdi; +import java.util.Properties; + import javax.cache.CacheManager; import javax.cache.Caching; import javax.cache.spi.CachingProvider; @@ -27,7 +29,6 @@ import javax.enterprise.inject.spi.Bean; import javax.enterprise.inject.spi.BeforeShutdown; import javax.enterprise.inject.spi.Extension; import javax.enterprise.inject.spi.ProcessBean; -import java.util.Properties; // add default CacheProvider and CacheManager public class ExtraJCacheExtension implements Extension diff --git a/commons-jcs3-jcache-extras/src/main/java/org/apache/commons/jcs3/jcache/extras/loader/CacheLoaderAdapter.java b/commons-jcs3-jcache-extras/src/main/java/org/apache/commons/jcs3/jcache/extras/loader/CacheLoaderAdapter.java index 51c601f0..5322c367 100644 --- a/commons-jcs3-jcache-extras/src/main/java/org/apache/commons/jcs3/jcache/extras/loader/CacheLoaderAdapter.java +++ b/commons-jcs3-jcache-extras/src/main/java/org/apache/commons/jcs3/jcache/extras/loader/CacheLoaderAdapter.java @@ -18,11 +18,12 @@ */ package org.apache.commons.jcs3.jcache.extras.loader; +import java.util.HashMap; +import java.util.Map; + import javax.cache.configuration.Factory; import javax.cache.integration.CacheLoader; import javax.cache.integration.CacheLoaderException; -import java.util.HashMap; -import java.util.Map; public abstract class CacheLoaderAdapter<K, V> implements CacheLoader<K, V>, Factory<CacheLoader<K, V>> { diff --git a/commons-jcs3-jcache-extras/src/main/java/org/apache/commons/jcs3/jcache/extras/loader/CompositeCacheLoader.java b/commons-jcs3-jcache-extras/src/main/java/org/apache/commons/jcs3/jcache/extras/loader/CompositeCacheLoader.java index 19c2f13e..dda97255 100644 --- a/commons-jcs3-jcache-extras/src/main/java/org/apache/commons/jcs3/jcache/extras/loader/CompositeCacheLoader.java +++ b/commons-jcs3-jcache-extras/src/main/java/org/apache/commons/jcs3/jcache/extras/loader/CompositeCacheLoader.java @@ -18,12 +18,6 @@ */ package org.apache.commons.jcs3.jcache.extras.loader; -import javax.cache.configuration.Factory; -import javax.cache.integration.CacheLoader; -import javax.cache.integration.CacheLoaderException; - -import org.apache.commons.jcs3.jcache.extras.closeable.Closeables; - import java.io.Closeable; import java.io.IOException; import java.util.ArrayList; @@ -31,6 +25,12 @@ import java.util.Collection; import java.util.HashMap; import java.util.Map; +import javax.cache.configuration.Factory; +import javax.cache.integration.CacheLoader; +import javax.cache.integration.CacheLoaderException; + +import org.apache.commons.jcs3.jcache.extras.closeable.Closeables; + public class CompositeCacheLoader<K, V> implements CacheLoader<K, V>, Closeable, Factory<CacheLoader<K, V>> { private static final long serialVersionUID = 5636608842581992435L; diff --git a/commons-jcs3-jcache-extras/src/main/java/org/apache/commons/jcs3/jcache/extras/web/InMemoryResponse.java b/commons-jcs3-jcache-extras/src/main/java/org/apache/commons/jcs3/jcache/extras/web/InMemoryResponse.java index c507b3e4..396cc755 100644 --- a/commons-jcs3-jcache-extras/src/main/java/org/apache/commons/jcs3/jcache/extras/web/InMemoryResponse.java +++ b/commons-jcs3-jcache-extras/src/main/java/org/apache/commons/jcs3/jcache/extras/web/InMemoryResponse.java @@ -30,6 +30,7 @@ import java.util.List; import java.util.Map; import java.util.TreeMap; import java.util.concurrent.CopyOnWriteArraySet; + import javax.servlet.ServletOutputStream; import javax.servlet.WriteListener; import javax.servlet.http.Cookie; diff --git a/commons-jcs3-jcache-extras/src/main/java/org/apache/commons/jcs3/jcache/extras/writer/AsyncCacheWriter.java b/commons-jcs3-jcache-extras/src/main/java/org/apache/commons/jcs3/jcache/extras/writer/AsyncCacheWriter.java index 3768b393..0646d836 100644 --- a/commons-jcs3-jcache-extras/src/main/java/org/apache/commons/jcs3/jcache/extras/writer/AsyncCacheWriter.java +++ b/commons-jcs3-jcache-extras/src/main/java/org/apache/commons/jcs3/jcache/extras/writer/AsyncCacheWriter.java @@ -18,10 +18,6 @@ */ package org.apache.commons.jcs3.jcache.extras.writer; -import javax.cache.Cache; -import javax.cache.configuration.Factory; -import javax.cache.integration.CacheWriter; -import javax.cache.integration.CacheWriterException; import java.io.Closeable; import java.io.IOException; import java.util.Collection; @@ -33,6 +29,11 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.logging.Level; import java.util.logging.Logger; +import javax.cache.Cache; +import javax.cache.configuration.Factory; +import javax.cache.integration.CacheWriter; +import javax.cache.integration.CacheWriterException; + public class AsyncCacheWriter<K, V> implements CacheWriter<K, V>, Closeable, Factory<CacheWriter<K, V>> { private static final long serialVersionUID = 4135226004268295465L; diff --git a/commons-jcs3-jcache-extras/src/main/java/org/apache/commons/jcs3/jcache/extras/writer/CacheWriterAdapter.java b/commons-jcs3-jcache-extras/src/main/java/org/apache/commons/jcs3/jcache/extras/writer/CacheWriterAdapter.java index 10418c75..9787ef39 100644 --- a/commons-jcs3-jcache-extras/src/main/java/org/apache/commons/jcs3/jcache/extras/writer/CacheWriterAdapter.java +++ b/commons-jcs3-jcache-extras/src/main/java/org/apache/commons/jcs3/jcache/extras/writer/CacheWriterAdapter.java @@ -18,11 +18,12 @@ */ package org.apache.commons.jcs3.jcache.extras.writer; +import java.util.Collection; + import javax.cache.Cache; import javax.cache.configuration.Factory; import javax.cache.integration.CacheWriter; import javax.cache.integration.CacheWriterException; -import java.util.Collection; public abstract class CacheWriterAdapter<K, V> implements CacheWriter<K, V>, Factory<CacheWriter<K, V>> { diff --git a/commons-jcs3-jcache-extras/src/main/java/org/apache/commons/jcs3/jcache/extras/writer/CompositeCacheWriter.java b/commons-jcs3-jcache-extras/src/main/java/org/apache/commons/jcs3/jcache/extras/writer/CompositeCacheWriter.java index 477c25c5..0879b072 100644 --- a/commons-jcs3-jcache-extras/src/main/java/org/apache/commons/jcs3/jcache/extras/writer/CompositeCacheWriter.java +++ b/commons-jcs3-jcache-extras/src/main/java/org/apache/commons/jcs3/jcache/extras/writer/CompositeCacheWriter.java @@ -18,6 +18,10 @@ */ package org.apache.commons.jcs3.jcache.extras.writer; +import java.io.Closeable; +import java.io.IOException; +import java.util.Collection; + import javax.cache.Cache; import javax.cache.configuration.Factory; import javax.cache.integration.CacheWriter; @@ -25,10 +29,6 @@ import javax.cache.integration.CacheWriterException; import org.apache.commons.jcs3.jcache.extras.closeable.Closeables; -import java.io.Closeable; -import java.io.IOException; -import java.util.Collection; - public class CompositeCacheWriter<K, V> implements CacheWriter<K, V>, Closeable, Factory<CacheWriter<K, V>> { private static final long serialVersionUID = -3305787850424123811L; diff --git a/commons-jcs3-jcache-extras/src/test/java/org/apache/commons/jcs3/jcache/extras/InternalCacheRule.java b/commons-jcs3-jcache-extras/src/test/java/org/apache/commons/jcs3/jcache/extras/InternalCacheRule.java index 16de39a8..023d692b 100644 --- a/commons-jcs3-jcache-extras/src/test/java/org/apache/commons/jcs3/jcache/extras/InternalCacheRule.java +++ b/commons-jcs3-jcache-extras/src/test/java/org/apache/commons/jcs3/jcache/extras/InternalCacheRule.java @@ -18,9 +18,7 @@ */ package org.apache.commons.jcs3.jcache.extras; -import org.junit.rules.TestRule; -import org.junit.runner.Description; -import org.junit.runners.model.Statement; +import java.lang.reflect.Field; import javax.cache.Cache; import javax.cache.CacheManager; @@ -28,7 +26,10 @@ import javax.cache.Caching; import javax.cache.configuration.CompleteConfiguration; import javax.cache.configuration.Configuration; import javax.cache.spi.CachingProvider; -import java.lang.reflect.Field; + +import org.junit.rules.TestRule; +import org.junit.runner.Description; +import org.junit.runners.model.Statement; // TODO: *if needed* define @CacheDeifnition instead of relying on field types public class InternalCacheRule implements TestRule diff --git a/commons-jcs3-jcache-extras/src/test/java/org/apache/commons/jcs3/jcache/extras/cdi/ExtraJCacheExtensionTest.java b/commons-jcs3-jcache-extras/src/test/java/org/apache/commons/jcs3/jcache/extras/cdi/ExtraJCacheExtensionTest.java index 08ac9903..49f065d2 100644 --- a/commons-jcs3-jcache-extras/src/test/java/org/apache/commons/jcs3/jcache/extras/cdi/ExtraJCacheExtensionTest.java +++ b/commons-jcs3-jcache-extras/src/test/java/org/apache/commons/jcs3/jcache/extras/cdi/ExtraJCacheExtensionTest.java @@ -18,6 +18,12 @@ */ package org.apache.commons.jcs3.jcache.extras.cdi; +import static org.junit.Assert.assertNotNull; + +import javax.cache.CacheManager; +import javax.cache.spi.CachingProvider; +import javax.inject.Inject; + import org.apache.webbeans.config.WebBeansContext; import org.apache.webbeans.container.BeanManagerImpl; import org.apache.webbeans.inject.OWBInjector; @@ -27,12 +33,6 @@ import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import javax.cache.CacheManager; -import javax.cache.spi.CachingProvider; -import javax.inject.Inject; - -import static org.junit.Assert.assertNotNull; - public class ExtraJCacheExtensionTest { private static BeanManagerImpl bm; diff --git a/commons-jcs3-jcache-extras/src/test/java/org/apache/commons/jcs3/jcache/extras/loader/CacheLoaderAdapterTest.java b/commons-jcs3-jcache-extras/src/test/java/org/apache/commons/jcs3/jcache/extras/loader/CacheLoaderAdapterTest.java index 6757778b..91a9155e 100644 --- a/commons-jcs3-jcache-extras/src/test/java/org/apache/commons/jcs3/jcache/extras/loader/CacheLoaderAdapterTest.java +++ b/commons-jcs3-jcache-extras/src/test/java/org/apache/commons/jcs3/jcache/extras/loader/CacheLoaderAdapterTest.java @@ -18,20 +18,21 @@ */ package org.apache.commons.jcs3.jcache.extras.loader; -import org.apache.commons.jcs3.jcache.extras.InternalCacheRule; -import org.junit.Rule; -import org.junit.Test; +import static java.util.Arrays.asList; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; + +import java.util.HashSet; +import java.util.concurrent.atomic.AtomicInteger; import javax.cache.Cache; import javax.cache.configuration.Configuration; import javax.cache.configuration.MutableConfiguration; import javax.cache.integration.CacheLoaderException; -import java.util.HashSet; -import java.util.concurrent.atomic.AtomicInteger; -import static java.util.Arrays.asList; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; +import org.apache.commons.jcs3.jcache.extras.InternalCacheRule; +import org.junit.Rule; +import org.junit.Test; public class CacheLoaderAdapterTest { diff --git a/commons-jcs3-jcache-extras/src/test/java/org/apache/commons/jcs3/jcache/extras/loader/CompositeCacheLoaderTest.java b/commons-jcs3-jcache-extras/src/test/java/org/apache/commons/jcs3/jcache/extras/loader/CompositeCacheLoaderTest.java index 529f50dc..38997482 100644 --- a/commons-jcs3-jcache-extras/src/test/java/org/apache/commons/jcs3/jcache/extras/loader/CompositeCacheLoaderTest.java +++ b/commons-jcs3-jcache-extras/src/test/java/org/apache/commons/jcs3/jcache/extras/loader/CompositeCacheLoaderTest.java @@ -18,17 +18,18 @@ */ package org.apache.commons.jcs3.jcache.extras.loader; -import org.apache.commons.jcs3.jcache.extras.InternalCacheRule; -import org.junit.Rule; -import org.junit.Test; +import static org.junit.Assert.assertEquals; + +import java.util.concurrent.atomic.AtomicInteger; import javax.cache.Cache; import javax.cache.configuration.Configuration; import javax.cache.configuration.MutableConfiguration; import javax.cache.integration.CacheLoaderException; -import java.util.concurrent.atomic.AtomicInteger; -import static org.junit.Assert.assertEquals; +import org.apache.commons.jcs3.jcache.extras.InternalCacheRule; +import org.junit.Rule; +import org.junit.Test; public class CompositeCacheLoaderTest { diff --git a/commons-jcs3-jcache-extras/src/test/java/org/apache/commons/jcs3/jcache/extras/writer/CacheWriterAdapterTest.java b/commons-jcs3-jcache-extras/src/test/java/org/apache/commons/jcs3/jcache/extras/writer/CacheWriterAdapterTest.java index 0476a888..b71f61ab 100644 --- a/commons-jcs3-jcache-extras/src/test/java/org/apache/commons/jcs3/jcache/extras/writer/CacheWriterAdapterTest.java +++ b/commons-jcs3-jcache-extras/src/test/java/org/apache/commons/jcs3/jcache/extras/writer/CacheWriterAdapterTest.java @@ -18,22 +18,23 @@ */ package org.apache.commons.jcs3.jcache.extras.writer; -import org.apache.commons.jcs3.jcache.extras.InternalCacheRule; -import org.junit.Rule; -import org.junit.Test; +import static java.util.Arrays.asList; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; import javax.cache.Cache; import javax.cache.configuration.Configuration; import javax.cache.configuration.MutableConfiguration; import javax.cache.integration.CacheWriterException; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import static java.util.Arrays.asList; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import org.apache.commons.jcs3.jcache.extras.InternalCacheRule; +import org.junit.Rule; +import org.junit.Test; public class CacheWriterAdapterTest { diff --git a/commons-jcs3-jcache-extras/src/test/java/org/apache/commons/jcs3/jcache/extras/writer/CompositeCacheWriterTest.java b/commons-jcs3-jcache-extras/src/test/java/org/apache/commons/jcs3/jcache/extras/writer/CompositeCacheWriterTest.java index 00073f88..77c412e5 100644 --- a/commons-jcs3-jcache-extras/src/test/java/org/apache/commons/jcs3/jcache/extras/writer/CompositeCacheWriterTest.java +++ b/commons-jcs3-jcache-extras/src/test/java/org/apache/commons/jcs3/jcache/extras/writer/CompositeCacheWriterTest.java @@ -18,19 +18,20 @@ */ package org.apache.commons.jcs3.jcache.extras.writer; -import org.apache.commons.jcs3.jcache.extras.InternalCacheRule; -import org.junit.Rule; -import org.junit.Test; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import java.util.HashMap; +import java.util.Map; import javax.cache.Cache; import javax.cache.configuration.Configuration; import javax.cache.configuration.MutableConfiguration; import javax.cache.integration.CacheWriterException; -import java.util.HashMap; -import java.util.Map; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import org.apache.commons.jcs3.jcache.extras.InternalCacheRule; +import org.junit.Rule; +import org.junit.Test; public class CompositeCacheWriterTest { diff --git a/commons-jcs3-jcache-openjpa/src/main/java/org/apache/commons/jcs3/jcache/openjpa/OpenJPAJCacheDataCache.java b/commons-jcs3-jcache-openjpa/src/main/java/org/apache/commons/jcs3/jcache/openjpa/OpenJPAJCacheDataCache.java index 618e6288..0b5ece75 100644 --- a/commons-jcs3-jcache-openjpa/src/main/java/org/apache/commons/jcs3/jcache/openjpa/OpenJPAJCacheDataCache.java +++ b/commons-jcs3-jcache-openjpa/src/main/java/org/apache/commons/jcs3/jcache/openjpa/OpenJPAJCacheDataCache.java @@ -18,16 +18,17 @@ */ package org.apache.commons.jcs3.jcache.openjpa; +import java.util.concurrent.locks.Lock; +import java.util.concurrent.locks.ReentrantLock; + +import javax.cache.Cache; +import javax.cache.CacheManager; + import org.apache.openjpa.datacache.AbstractDataCache; import org.apache.openjpa.datacache.DataCacheManager; import org.apache.openjpa.datacache.DataCachePCData; import org.apache.openjpa.util.OpenJPAId; -import javax.cache.Cache; -import javax.cache.CacheManager; -import java.util.concurrent.locks.Lock; -import java.util.concurrent.locks.ReentrantLock; - public class OpenJPAJCacheDataCache extends AbstractDataCache { private static final long serialVersionUID = -5472249582181438434L; diff --git a/commons-jcs3-jcache-openjpa/src/main/java/org/apache/commons/jcs3/jcache/openjpa/OpenJPAJCacheDerivation.java b/commons-jcs3-jcache-openjpa/src/main/java/org/apache/commons/jcs3/jcache/openjpa/OpenJPAJCacheDerivation.java index 44ebd0e4..ae14507e 100644 --- a/commons-jcs3-jcache-openjpa/src/main/java/org/apache/commons/jcs3/jcache/openjpa/OpenJPAJCacheDerivation.java +++ b/commons-jcs3-jcache-openjpa/src/main/java/org/apache/commons/jcs3/jcache/openjpa/OpenJPAJCacheDerivation.java @@ -18,6 +18,8 @@ */ package org.apache.commons.jcs3.jcache.openjpa; +import java.util.Map; + import org.apache.openjpa.conf.OpenJPAConfiguration; import org.apache.openjpa.conf.OpenJPAConfigurationImpl; import org.apache.openjpa.event.SingleJVMRemoteCommitProvider; @@ -26,8 +28,6 @@ import org.apache.openjpa.lib.conf.Configuration; import org.apache.openjpa.lib.conf.ConfigurationProvider; import org.apache.openjpa.lib.conf.Configurations; -import java.util.Map; - public class OpenJPAJCacheDerivation extends AbstractProductDerivation { private static final String JCACHE_NAME = "jcache"; diff --git a/commons-jcs3-jcache-openjpa/src/main/java/org/apache/commons/jcs3/jcache/openjpa/OpenJPAJCacheQueryCache.java b/commons-jcs3-jcache-openjpa/src/main/java/org/apache/commons/jcs3/jcache/openjpa/OpenJPAJCacheQueryCache.java index 3e84a7a3..3ecd55b2 100644 --- a/commons-jcs3-jcache-openjpa/src/main/java/org/apache/commons/jcs3/jcache/openjpa/OpenJPAJCacheQueryCache.java +++ b/commons-jcs3-jcache-openjpa/src/main/java/org/apache/commons/jcs3/jcache/openjpa/OpenJPAJCacheQueryCache.java @@ -18,18 +18,19 @@ */ package org.apache.commons.jcs3.jcache.openjpa; -import org.apache.openjpa.datacache.AbstractQueryCache; -import org.apache.openjpa.datacache.DataCacheManager; -import org.apache.openjpa.datacache.QueryKey; -import org.apache.openjpa.datacache.QueryResult; - -import javax.cache.Cache; -import javax.cache.CacheManager; import java.util.Collection; import java.util.LinkedList; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; +import javax.cache.Cache; +import javax.cache.CacheManager; + +import org.apache.openjpa.datacache.AbstractQueryCache; +import org.apache.openjpa.datacache.DataCacheManager; +import org.apache.openjpa.datacache.QueryKey; +import org.apache.openjpa.datacache.QueryResult; + public class OpenJPAJCacheQueryCache extends AbstractQueryCache { private static final long serialVersionUID = 6646905946950592841L; diff --git a/commons-jcs3-jcache-tck/src/test/java/org/apache/commons/jcs3/jcache/OWBBeanProvider.java b/commons-jcs3-jcache-tck/src/test/java/org/apache/commons/jcs3/jcache/OWBBeanProvider.java index 2f0d006f..cae7cc90 100644 --- a/commons-jcs3-jcache-tck/src/test/java/org/apache/commons/jcs3/jcache/OWBBeanProvider.java +++ b/commons-jcs3-jcache-tck/src/test/java/org/apache/commons/jcs3/jcache/OWBBeanProvider.java @@ -18,14 +18,15 @@ */ package org.apache.commons.jcs3.jcache; -import org.apache.webbeans.config.WebBeansContext; -import org.apache.webbeans.container.BeanManagerImpl; -import org.apache.webbeans.spi.ContainerLifecycle; - import java.util.Set; + import javax.cache.annotation.BeanProvider; import javax.enterprise.inject.spi.Bean; +import org.apache.webbeans.config.WebBeansContext; +import org.apache.webbeans.container.BeanManagerImpl; +import org.apache.webbeans.spi.ContainerLifecycle; + public class OWBBeanProvider implements BeanProvider { private final BeanManagerImpl bm; diff --git a/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/JCSCachingProvider.java b/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/JCSCachingProvider.java index 52929c3f..7ddc0749 100644 --- a/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/JCSCachingProvider.java +++ b/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/JCSCachingProvider.java @@ -18,15 +18,16 @@ */ package org.apache.commons.jcs3.jcache; -import javax.cache.CacheManager; -import javax.cache.configuration.OptionalFeature; -import javax.cache.spi.CachingProvider; import java.net.URI; import java.util.Map; import java.util.Properties; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; +import javax.cache.CacheManager; +import javax.cache.configuration.OptionalFeature; +import javax.cache.spi.CachingProvider; + public class JCSCachingProvider implements CachingProvider { public static final URI DEFAULT_URI = URI.create("jcs://jcache.ccf"); diff --git a/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/JCSConfiguration.java b/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/JCSConfiguration.java index 716505cb..2c6dc6df 100644 --- a/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/JCSConfiguration.java +++ b/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/JCSConfiguration.java @@ -33,6 +33,10 @@ */ package org.apache.commons.jcs3.jcache; +import java.util.Collections; +import java.util.HashSet; +import java.util.Set; + import javax.cache.configuration.CacheEntryListenerConfiguration; import javax.cache.configuration.CompleteConfiguration; import javax.cache.configuration.Configuration; @@ -41,9 +45,6 @@ import javax.cache.expiry.EternalExpiryPolicy; import javax.cache.expiry.ExpiryPolicy; import javax.cache.integration.CacheLoader; import javax.cache.integration.CacheWriter; -import java.util.Collections; -import java.util.HashSet; -import java.util.Set; public class JCSConfiguration<K, V> implements CompleteConfiguration<K, V> { diff --git a/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/TempStateCacheView.java b/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/TempStateCacheView.java index 87049bfa..ef401edf 100644 --- a/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/TempStateCacheView.java +++ b/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/TempStateCacheView.java @@ -18,16 +18,6 @@ */ package org.apache.commons.jcs3.jcache; -import javax.cache.Cache; -import javax.cache.CacheManager; -import javax.cache.configuration.CacheEntryListenerConfiguration; -import javax.cache.configuration.CompleteConfiguration; -import javax.cache.configuration.Configuration; -import javax.cache.integration.CompletionListener; -import javax.cache.processor.EntryProcessor; -import javax.cache.processor.EntryProcessorException; -import javax.cache.processor.EntryProcessorResult; - import static org.apache.commons.jcs3.jcache.Asserts.assertNotNull; import java.util.Collection; @@ -38,6 +28,16 @@ import java.util.LinkedList; import java.util.Map; import java.util.Set; +import javax.cache.Cache; +import javax.cache.CacheManager; +import javax.cache.configuration.CacheEntryListenerConfiguration; +import javax.cache.configuration.CompleteConfiguration; +import javax.cache.configuration.Configuration; +import javax.cache.integration.CompletionListener; +import javax.cache.processor.EntryProcessor; +import javax.cache.processor.EntryProcessorException; +import javax.cache.processor.EntryProcessorResult; + // kind of transactional view for a Cache<K, V>, to use with EntryProcessor public class TempStateCacheView<K, V> implements Cache<K, V> { diff --git a/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/cdi/CacheInvocationParameterImpl.java b/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/cdi/CacheInvocationParameterImpl.java index 4d5caa53..b95832f0 100644 --- a/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/cdi/CacheInvocationParameterImpl.java +++ b/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/cdi/CacheInvocationParameterImpl.java @@ -18,10 +18,11 @@ */ package org.apache.commons.jcs3.jcache.cdi; -import javax.cache.annotation.CacheInvocationParameter; import java.lang.annotation.Annotation; import java.util.Set; +import javax.cache.annotation.CacheInvocationParameter; + public class CacheInvocationParameterImpl implements CacheInvocationParameter { private final Class<?> type; diff --git a/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/cdi/CacheKeyGeneratorImpl.java b/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/cdi/CacheKeyGeneratorImpl.java index 10e0a416..488b2527 100644 --- a/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/cdi/CacheKeyGeneratorImpl.java +++ b/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/cdi/CacheKeyGeneratorImpl.java @@ -18,11 +18,12 @@ */ package org.apache.commons.jcs3.jcache.cdi; +import java.lang.annotation.Annotation; + import javax.cache.annotation.CacheInvocationParameter; import javax.cache.annotation.CacheKeyGenerator; import javax.cache.annotation.CacheKeyInvocationContext; import javax.cache.annotation.GeneratedCacheKey; -import java.lang.annotation.Annotation; public class CacheKeyGeneratorImpl implements CacheKeyGenerator { diff --git a/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/cdi/CacheMethodDetailsImpl.java b/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/cdi/CacheMethodDetailsImpl.java index b9a0df1a..c57a0613 100644 --- a/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/cdi/CacheMethodDetailsImpl.java +++ b/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/cdi/CacheMethodDetailsImpl.java @@ -18,12 +18,13 @@ */ package org.apache.commons.jcs3.jcache.cdi; -import javax.cache.annotation.CacheMethodDetails; -import javax.interceptor.InvocationContext; import java.lang.annotation.Annotation; import java.lang.reflect.Method; import java.util.Set; +import javax.cache.annotation.CacheMethodDetails; +import javax.interceptor.InvocationContext; + public class CacheMethodDetailsImpl<A extends Annotation> implements CacheMethodDetails<A> { protected final InvocationContext delegate; diff --git a/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/cdi/CacheResolverFactoryImpl.java b/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/cdi/CacheResolverFactoryImpl.java index 02cc439f..3525fe6e 100644 --- a/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/cdi/CacheResolverFactoryImpl.java +++ b/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/cdi/CacheResolverFactoryImpl.java @@ -18,6 +18,8 @@ */ package org.apache.commons.jcs3.jcache.cdi; +import java.lang.annotation.Annotation; + import javax.cache.Cache; import javax.cache.CacheManager; import javax.cache.Caching; @@ -27,7 +29,6 @@ import javax.cache.annotation.CacheResolverFactory; import javax.cache.annotation.CacheResult; import javax.cache.configuration.MutableConfiguration; import javax.cache.spi.CachingProvider; -import java.lang.annotation.Annotation; public class CacheResolverFactoryImpl implements CacheResolverFactory { diff --git a/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/cdi/CacheResolverImpl.java b/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/cdi/CacheResolverImpl.java index 49e1e91d..e0eccc38 100644 --- a/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/cdi/CacheResolverImpl.java +++ b/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/cdi/CacheResolverImpl.java @@ -18,10 +18,11 @@ */ package org.apache.commons.jcs3.jcache.cdi; +import java.lang.annotation.Annotation; + import javax.cache.Cache; import javax.cache.annotation.CacheInvocationContext; import javax.cache.annotation.CacheResolver; -import java.lang.annotation.Annotation; public class CacheResolverImpl implements CacheResolver { diff --git a/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/cdi/CacheResultInterceptor.java b/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/cdi/CacheResultInterceptor.java index 39c41169..54a0e224 100644 --- a/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/cdi/CacheResultInterceptor.java +++ b/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/cdi/CacheResultInterceptor.java @@ -19,6 +19,7 @@ package org.apache.commons.jcs3.jcache.cdi; import java.io.Serializable; + import javax.annotation.Priority; import javax.cache.Cache; import javax.cache.annotation.CacheKeyInvocationContext; diff --git a/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/cdi/GeneratedCacheKeyImpl.java b/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/cdi/GeneratedCacheKeyImpl.java index a3c2c26a..c742faff 100644 --- a/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/cdi/GeneratedCacheKeyImpl.java +++ b/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/cdi/GeneratedCacheKeyImpl.java @@ -18,9 +18,10 @@ */ package org.apache.commons.jcs3.jcache.cdi; -import javax.cache.annotation.GeneratedCacheKey; import java.util.Arrays; +import javax.cache.annotation.GeneratedCacheKey; + public class GeneratedCacheKeyImpl implements GeneratedCacheKey { /** diff --git a/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/cdi/MakeJCacheCDIInterceptorFriendly.java b/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/cdi/MakeJCacheCDIInterceptorFriendly.java index 4c8ff99b..44ed7d78 100644 --- a/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/cdi/MakeJCacheCDIInterceptorFriendly.java +++ b/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/cdi/MakeJCacheCDIInterceptorFriendly.java @@ -18,12 +18,15 @@ */ package org.apache.commons.jcs3.jcache.cdi; +import static java.util.Arrays.asList; + import java.lang.annotation.Annotation; import java.lang.reflect.Type; import java.util.Collections; import java.util.HashSet; import java.util.Set; import java.util.concurrent.atomic.AtomicInteger; + import javax.cache.annotation.CachePut; import javax.cache.annotation.CacheRemove; import javax.cache.annotation.CacheRemoveAll; @@ -45,8 +48,6 @@ import javax.enterprise.inject.spi.PassivationCapable; import javax.enterprise.inject.spi.ProcessAnnotatedType; import javax.enterprise.util.AnnotationLiteral; -import static java.util.Arrays.asList; - // TODO: observe annotated type (or maybe sthg else) to cache data and inject this extension (used as metadata cache) // to get class model and this way allow to add cache annotation on the fly - == avoid java pure reflection to get metadata public class MakeJCacheCDIInterceptorFriendly implements Extension diff --git a/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/jmx/ConfigurableMBeanServerIdBuilder.java b/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/jmx/ConfigurableMBeanServerIdBuilder.java index 38e3adb2..ab888a8d 100644 --- a/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/jmx/ConfigurableMBeanServerIdBuilder.java +++ b/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/jmx/ConfigurableMBeanServerIdBuilder.java @@ -18,6 +18,9 @@ */ package org.apache.commons.jcs3.jcache.jmx; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; + import javax.management.ListenerNotFoundException; import javax.management.MBeanNotificationInfo; import javax.management.MBeanServer; @@ -26,8 +29,6 @@ import javax.management.MBeanServerDelegate; import javax.management.Notification; import javax.management.NotificationFilter; import javax.management.NotificationListener; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentMap; public class ConfigurableMBeanServerIdBuilder extends MBeanServerBuilder { diff --git a/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/jmx/JMXs.java b/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/jmx/JMXs.java index 31d1f605..f2cedb92 100644 --- a/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/jmx/JMXs.java +++ b/commons-jcs3-jcache/src/main/java/org/apache/commons/jcs3/jcache/jmx/JMXs.java @@ -18,10 +18,11 @@ */ package org.apache.commons.jcs3.jcache.jmx; +import java.lang.management.ManagementFactory; + import javax.management.MBeanServer; import javax.management.MBeanServerFactory; import javax.management.ObjectName; -import java.lang.management.ManagementFactory; public class JMXs { diff --git a/commons-jcs3-jcache/src/test/java/org/apache/commons/jcs3/jcache/CacheTest.java b/commons-jcs3-jcache/src/test/java/org/apache/commons/jcs3/jcache/CacheTest.java index e44c5ade..942c5e3e 100644 --- a/commons-jcs3-jcache/src/test/java/org/apache/commons/jcs3/jcache/CacheTest.java +++ b/commons-jcs3-jcache/src/test/java/org/apache/commons/jcs3/jcache/CacheTest.java @@ -1,25 +1,13 @@ package org.apache.commons.jcs3.jcache; -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; -import org.junit.Test; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.TimeUnit; import javax.cache.Cache; import javax.cache.CacheManager; @@ -40,14 +28,27 @@ import javax.cache.integration.CacheLoader; import javax.cache.integration.CacheLoaderException; import javax.cache.integration.CacheWriter; import javax.cache.spi.CachingProvider; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; -import java.util.concurrent.TimeUnit; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import org.junit.Test; public class CacheTest { diff --git a/commons-jcs3-jcache/src/test/java/org/apache/commons/jcs3/jcache/CachingProviderTest.java b/commons-jcs3-jcache/src/test/java/org/apache/commons/jcs3/jcache/CachingProviderTest.java index 5e28cf4e..a0a6a009 100644 --- a/commons-jcs3-jcache/src/test/java/org/apache/commons/jcs3/jcache/CachingProviderTest.java +++ b/commons-jcs3-jcache/src/test/java/org/apache/commons/jcs3/jcache/CachingProviderTest.java @@ -1,5 +1,10 @@ package org.apache.commons.jcs3.jcache; +import static org.junit.Assert.assertNotNull; + +import javax.cache.Caching; +import javax.cache.spi.CachingProvider; + /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -21,11 +26,6 @@ package org.apache.commons.jcs3.jcache; import org.junit.Test; -import javax.cache.Caching; -import javax.cache.spi.CachingProvider; - -import static org.junit.Assert.assertNotNull; - public class CachingProviderTest { @Test diff --git a/commons-jcs3-jcache/src/test/java/org/apache/commons/jcs3/jcache/NotSerializableTest.java b/commons-jcs3-jcache/src/test/java/org/apache/commons/jcs3/jcache/NotSerializableTest.java index 7ce2526c..2f1bec16 100644 --- a/commons-jcs3-jcache/src/test/java/org/apache/commons/jcs3/jcache/NotSerializableTest.java +++ b/commons-jcs3-jcache/src/test/java/org/apache/commons/jcs3/jcache/NotSerializableTest.java @@ -18,7 +18,9 @@ */ package org.apache.commons.jcs3.jcache; -import org.junit.Test; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; import javax.cache.Cache; import javax.cache.CacheManager; @@ -26,9 +28,7 @@ import javax.cache.Caching; import javax.cache.configuration.MutableConfiguration; import javax.cache.spi.CachingProvider; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import org.junit.Test; public class NotSerializableTest { diff --git a/commons-jcs3-jcache/src/test/java/org/apache/commons/jcs3/jcache/cdi/CDIJCacheHelperTest.java b/commons-jcs3-jcache/src/test/java/org/apache/commons/jcs3/jcache/cdi/CDIJCacheHelperTest.java index 16c550d8..37b61dc0 100644 --- a/commons-jcs3-jcache/src/test/java/org/apache/commons/jcs3/jcache/cdi/CDIJCacheHelperTest.java +++ b/commons-jcs3-jcache/src/test/java/org/apache/commons/jcs3/jcache/cdi/CDIJCacheHelperTest.java @@ -1,5 +1,8 @@ package org.apache.commons.jcs3.jcache.cdi; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.fail; + /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -23,13 +26,11 @@ import java.lang.reflect.Constructor; import java.lang.reflect.Method; import java.lang.reflect.Proxy; import java.util.Map; + import javax.cache.annotation.CacheDefaults; import javax.cache.annotation.CacheResult; import javax.interceptor.InvocationContext; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.fail; - import org.junit.Test; public class CDIJCacheHelperTest diff --git a/commons-jcs3-sandbox/commons-jcs3-filecache/src/main/java/org/apache/commons/jcs/auxiliary/disk/file/FileDiskCache.java b/commons-jcs3-sandbox/commons-jcs3-filecache/src/main/java/org/apache/commons/jcs/auxiliary/disk/file/FileDiskCache.java index 69fb1888..d365a394 100644 --- a/commons-jcs3-sandbox/commons-jcs3-filecache/src/main/java/org/apache/commons/jcs/auxiliary/disk/file/FileDiskCache.java +++ b/commons-jcs3-sandbox/commons-jcs3-filecache/src/main/java/org/apache/commons/jcs/auxiliary/disk/file/FileDiskCache.java @@ -29,15 +29,15 @@ import java.io.OutputStream; import java.util.Map; import java.util.Set; -import org.apache.commons.jcs.auxiliary.AuxiliaryCacheAttributes; -import org.apache.commons.jcs.auxiliary.disk.AbstractDiskCache; -import org.apache.commons.jcs.engine.behavior.ICacheElement; -import org.apache.commons.jcs.engine.behavior.IElementSerializer; -import org.apache.commons.jcs.engine.logging.behavior.ICacheEvent; -import org.apache.commons.jcs.engine.logging.behavior.ICacheEventLogger; import org.apache.commons.jcs.utils.timing.SleepUtil; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.apache.commons.jcs3.auxiliary.AuxiliaryCacheAttributes; +import org.apache.commons.jcs3.auxiliary.disk.AbstractDiskCache; +import org.apache.commons.jcs3.engine.behavior.ICacheElement; +import org.apache.commons.jcs3.engine.behavior.IElementSerializer; +import org.apache.commons.jcs3.engine.logging.behavior.ICacheEvent; +import org.apache.commons.jcs3.engine.logging.behavior.ICacheEventLogger; +import org.apache.commons.jcs3.log.Log; +import org.apache.commons.jcs3.log.LogFactory; /** * This disk cache writes each item to a separate file. This is for regions with very few items, diff --git a/commons-jcs3-sandbox/commons-jcs3-filecache/src/main/java/org/apache/commons/jcs/auxiliary/disk/file/FileDiskCacheAttributes.java b/commons-jcs3-sandbox/commons-jcs3-filecache/src/main/java/org/apache/commons/jcs/auxiliary/disk/file/FileDiskCacheAttributes.java index 3bd8c637..94399e7e 100644 --- a/commons-jcs3-sandbox/commons-jcs3-filecache/src/main/java/org/apache/commons/jcs/auxiliary/disk/file/FileDiskCacheAttributes.java +++ b/commons-jcs3-sandbox/commons-jcs3-filecache/src/main/java/org/apache/commons/jcs/auxiliary/disk/file/FileDiskCacheAttributes.java @@ -1,25 +1,6 @@ package org.apache.commons.jcs.auxiliary.disk.file; -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import org.apache.commons.jcs.auxiliary.disk.AbstractDiskCacheAttributes; +import org.apache.commons.jcs3.auxiliary.disk.AbstractDiskCacheAttributes; /** * Configuration values for the file disk cache. diff --git a/commons-jcs3-sandbox/commons-jcs3-filecache/src/main/java/org/apache/commons/jcs/auxiliary/disk/file/FileDiskCacheFactory.java b/commons-jcs3-sandbox/commons-jcs3-filecache/src/main/java/org/apache/commons/jcs/auxiliary/disk/file/FileDiskCacheFactory.java index f31be1e4..bbd8532c 100644 --- a/commons-jcs3-sandbox/commons-jcs3-filecache/src/main/java/org/apache/commons/jcs/auxiliary/disk/file/FileDiskCacheFactory.java +++ b/commons-jcs3-sandbox/commons-jcs3-filecache/src/main/java/org/apache/commons/jcs/auxiliary/disk/file/FileDiskCacheFactory.java @@ -1,31 +1,12 @@ package org.apache.commons.jcs.auxiliary.disk.file; -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import org.apache.commons.jcs.auxiliary.AuxiliaryCacheAttributes; -import org.apache.commons.jcs.auxiliary.AuxiliaryCacheFactory; -import org.apache.commons.jcs.engine.behavior.ICompositeCacheManager; -import org.apache.commons.jcs.engine.behavior.IElementSerializer; -import org.apache.commons.jcs.engine.logging.behavior.ICacheEventLogger; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.apache.commons.jcs3.auxiliary.AuxiliaryCacheAttributes; +import org.apache.commons.jcs3.auxiliary.AuxiliaryCacheFactory; +import org.apache.commons.jcs3.engine.behavior.ICompositeCacheManager; +import org.apache.commons.jcs3.engine.behavior.IElementSerializer; +import org.apache.commons.jcs3.engine.logging.behavior.ICacheEventLogger; +import org.apache.commons.jcs3.log.Log; +import org.apache.commons.jcs3.log.LogFactory; /** Create Disk File Caches */ public class FileDiskCacheFactory diff --git a/commons-jcs3-sandbox/commons-jcs3-filecache/src/main/java/org/apache/commons/jcs/auxiliary/disk/file/FileDiskCacheManager.java b/commons-jcs3-sandbox/commons-jcs3-filecache/src/main/java/org/apache/commons/jcs/auxiliary/disk/file/FileDiskCacheManager.java index 735358cb..f66e5825 100644 --- a/commons-jcs3-sandbox/commons-jcs3-filecache/src/main/java/org/apache/commons/jcs/auxiliary/disk/file/FileDiskCacheManager.java +++ b/commons-jcs3-sandbox/commons-jcs3-filecache/src/main/java/org/apache/commons/jcs/auxiliary/disk/file/FileDiskCacheManager.java @@ -24,10 +24,10 @@ import java.util.concurrent.ConcurrentMap; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; -import org.apache.commons.jcs.engine.behavior.IElementSerializer; -import org.apache.commons.jcs.engine.logging.behavior.ICacheEventLogger; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import org.apache.commons.jcs3.engine.behavior.IElementSerializer; +import org.apache.commons.jcs3.engine.logging.behavior.ICacheEventLogger; +import org.apache.commons.jcs3.log.Log; +import org.apache.commons.jcs3.log.LogFactory; /** * This is a non singleton. It creates caches on a per region basis. diff --git a/commons-jcs3-sandbox/commons-jcs3-filecache/src/test/java/org/apache/commons/jcs/auxiliary/disk/file/FileDiskCacheFactoryUnitTest.java b/commons-jcs3-sandbox/commons-jcs3-filecache/src/test/java/org/apache/commons/jcs/auxiliary/disk/file/FileDiskCacheFactoryUnitTest.java index 13fdcb0d..8e2da345 100644 --- a/commons-jcs3-sandbox/commons-jcs3-filecache/src/test/java/org/apache/commons/jcs/auxiliary/disk/file/FileDiskCacheFactoryUnitTest.java +++ b/commons-jcs3-sandbox/commons-jcs3-filecache/src/test/java/org/apache/commons/jcs/auxiliary/disk/file/FileDiskCacheFactoryUnitTest.java @@ -20,12 +20,12 @@ package org.apache.commons.jcs.auxiliary.disk.file; */ import junit.framework.TestCase; -import org.apache.commons.jcs.auxiliary.MockCacheEventLogger; -import org.apache.commons.jcs.engine.behavior.ICompositeCacheManager; -import org.apache.commons.jcs.engine.behavior.IElementSerializer; -import org.apache.commons.jcs.engine.control.MockCompositeCacheManager; -import org.apache.commons.jcs.engine.control.MockElementSerializer; -import org.apache.commons.jcs.engine.logging.behavior.ICacheEventLogger; + +import org.apache.commons.jcs3.engine.behavior.ICompositeCacheManager; +import org.apache.commons.jcs3.engine.behavior.IElementSerializer; +import org.apache.commons.jcs3.engine.control.MockCompositeCacheManager; +import org.apache.commons.jcs3.engine.control.MockElementSerializer; +import org.apache.commons.jcs3.engine.logging.behavior.ICacheEventLogger; /** Verify that the factory works */ public class FileDiskCacheFactoryUnitTest diff --git a/commons-jcs3-sandbox/commons-jcs3-filecache/src/test/java/org/apache/commons/jcs/auxiliary/disk/file/FileDiskCacheUnitTest.java b/commons-jcs3-sandbox/commons-jcs3-filecache/src/test/java/org/apache/commons/jcs/auxiliary/disk/file/FileDiskCacheUnitTest.java index 7f7b9852..69e948ac 100644 --- a/commons-jcs3-sandbox/commons-jcs3-filecache/src/test/java/org/apache/commons/jcs/auxiliary/disk/file/FileDiskCacheUnitTest.java +++ b/commons-jcs3-sandbox/commons-jcs3-filecache/src/test/java/org/apache/commons/jcs/auxiliary/disk/file/FileDiskCacheUnitTest.java @@ -1,5 +1,7 @@ package org.apache.commons.jcs.auxiliary.disk.file; +import java.io.File; + /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -20,12 +22,11 @@ package org.apache.commons.jcs.auxiliary.disk.file; */ import junit.framework.TestCase; -import org.apache.commons.jcs.engine.CacheElement; -import org.apache.commons.jcs.engine.CacheStatus; -import org.apache.commons.jcs.engine.behavior.ICacheElement; -import org.apache.commons.jcs.utils.timing.SleepUtil; -import java.io.File; +import org.apache.commons.jcs3.engine.CacheElement; +import org.apache.commons.jcs3.engine.CacheStatus; +import org.apache.commons.jcs3.engine.behavior.ICacheElement; +import org.apache.commons.jcs3.utils.timing.SleepUtil; /** Unit tests for the disk file cache. */ public class FileDiskCacheUnitTest