From 248d5b0dd73a7dac596c47d78fa4a6fe8a1732a0 Mon Sep 17 00:00:00 2001 From: Manuel Leduc Date: Thu, 17 Oct 2024 10:45:19 +0200 Subject: [PATCH] XCOMMONS-3174: Move org.xwiki.cache.util.AbstractCache#AbstractCache() to legacy --- .../xwiki-commons-cache-api/pom.xml | 2 + .../org/xwiki/cache/util/AbstractCache.java | 11 +- .../xwiki-commons-legacy/pom.xml | 1 + .../xwiki-commons-legacy-cache/pom.xml | 37 ++++++ .../xwiki-commons-legacy-cache-api/pom.xml | 108 ++++++++++++++++++ .../util/AbstractCacheCompatibilityAspect.aj | 32 ++++++ 6 files changed, 181 insertions(+), 10 deletions(-) create mode 100644 xwiki-commons-core/xwiki-commons-legacy/xwiki-commons-legacy-cache/pom.xml create mode 100644 xwiki-commons-core/xwiki-commons-legacy/xwiki-commons-legacy-cache/xwiki-commons-legacy-cache-api/pom.xml create mode 100644 xwiki-commons-core/xwiki-commons-legacy/xwiki-commons-legacy-cache/xwiki-commons-legacy-cache-api/src/main/aspect/org/xwiki/cache/util/AbstractCacheCompatibilityAspect.aj diff --git a/xwiki-commons-core/xwiki-commons-cache/xwiki-commons-cache-api/pom.xml b/xwiki-commons-core/xwiki-commons-cache/xwiki-commons-cache-api/pom.xml index f2ba425df8..6ad5bd39ca 100644 --- a/xwiki-commons-core/xwiki-commons-cache/xwiki-commons-cache-api/pom.xml +++ b/xwiki-commons-core/xwiki-commons-cache/xwiki-commons-cache-api/pom.xml @@ -35,6 +35,8 @@ 0.10 org.xwiki.platform:xwiki-platform-cache-api + + true diff --git a/xwiki-commons-core/xwiki-commons-cache/xwiki-commons-cache-api/src/main/java/org/xwiki/cache/util/AbstractCache.java b/xwiki-commons-core/xwiki-commons-cache/xwiki-commons-cache-api/src/main/java/org/xwiki/cache/util/AbstractCache.java index 0215579da9..079cbd608e 100644 --- a/xwiki-commons-core/xwiki-commons-cache/xwiki-commons-cache-api/src/main/java/org/xwiki/cache/util/AbstractCache.java +++ b/xwiki-commons-core/xwiki-commons-cache/xwiki-commons-cache-api/src/main/java/org/xwiki/cache/util/AbstractCache.java @@ -31,7 +31,7 @@ /** * Base class for {@link Cache} implementations. It provides events {@link DisposableCacheValue} management. - * + * * @param the class of the data stored in the cache. * @version $Id$ */ @@ -52,15 +52,6 @@ public abstract class AbstractCache implements Cache */ protected final EventListenerList cacheEntryListeners = new EventListenerList(); - /** - * @deprecated since 8.3RC1, use {@link #AbstractCache(CacheConfiguration)} instead - */ - @Deprecated - public AbstractCache() - { - this(null); - } - /** * @param configuration the configuration of the cache */ diff --git a/xwiki-commons-core/xwiki-commons-legacy/pom.xml b/xwiki-commons-core/xwiki-commons-legacy/pom.xml index 25bd7fc614..04844de2ba 100644 --- a/xwiki-commons-core/xwiki-commons-legacy/pom.xml +++ b/xwiki-commons-core/xwiki-commons-legacy/pom.xml @@ -36,6 +36,7 @@ true + xwiki-commons-legacy-cache xwiki-commons-legacy-classloader xwiki-commons-legacy-component xwiki-commons-legacy-configuration diff --git a/xwiki-commons-core/xwiki-commons-legacy/xwiki-commons-legacy-cache/pom.xml b/xwiki-commons-core/xwiki-commons-legacy/xwiki-commons-legacy-cache/pom.xml new file mode 100644 index 0000000000..8d491e2ec4 --- /dev/null +++ b/xwiki-commons-core/xwiki-commons-legacy/xwiki-commons-legacy-cache/pom.xml @@ -0,0 +1,37 @@ + + + + + + 4.0.0 + + org.xwiki.commons + xwiki-commons-legacy + 16.9.0-SNAPSHOT + + xwiki-commons-legacy-cache + XWiki Commons - Legacy - Cache - Parent POM + pom + Legacy modules for xwiki-commons-cache-* + + xwiki-commons-legacy-cache-api + + diff --git a/xwiki-commons-core/xwiki-commons-legacy/xwiki-commons-legacy-cache/xwiki-commons-legacy-cache-api/pom.xml b/xwiki-commons-core/xwiki-commons-legacy/xwiki-commons-legacy-cache/xwiki-commons-legacy-cache-api/pom.xml new file mode 100644 index 0000000000..edaf833cc6 --- /dev/null +++ b/xwiki-commons-core/xwiki-commons-legacy/xwiki-commons-legacy-cache/xwiki-commons-legacy-cache-api/pom.xml @@ -0,0 +1,108 @@ + + + + + + 4.0.0 + + org.xwiki.commons + xwiki-commons-legacy-cache + 16.9.0-SNAPSHOT + + xwiki-commons-legacy-cache-api + XWiki Commons - Legacy - Classloader - API + jar + Legacy module for xwiki-commons-cache-api + + 0.00 + + org.xwiki.commons:xwiki-commons-cache-api + + + + + org.xwiki.commons + xwiki-commons-cache-api + ${project.version} + pom + + + + + org.aspectj + aspectjrt + + + + + org.xwiki.commons + xwiki-commons-cache-api + ${project.version} + provided + + + + + + + org.codehaus.mojo + aspectj-maven-plugin + + + backward-compatibility-aspects + + compile + + + + + + + org.xwiki.commons + xwiki-commons-cache-api + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + **/builddef.lst + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + org.xwiki.commons:xwiki-commons-cache-api:jar + + + + + + diff --git a/xwiki-commons-core/xwiki-commons-legacy/xwiki-commons-legacy-cache/xwiki-commons-legacy-cache-api/src/main/aspect/org/xwiki/cache/util/AbstractCacheCompatibilityAspect.aj b/xwiki-commons-core/xwiki-commons-legacy/xwiki-commons-legacy-cache/xwiki-commons-legacy-cache-api/src/main/aspect/org/xwiki/cache/util/AbstractCacheCompatibilityAspect.aj new file mode 100644 index 0000000000..77cc03046c --- /dev/null +++ b/xwiki-commons-core/xwiki-commons-legacy/xwiki-commons-legacy-cache/xwiki-commons-legacy-cache-api/src/main/aspect/org/xwiki/cache/util/AbstractCacheCompatibilityAspect.aj @@ -0,0 +1,32 @@ +/* + * See the NOTICE file distributed with this work for additional + * information regarding copyright ownership. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ + +package org.xwiki.cache.util; + +public privileged aspect AbstractCacheCompatibilityAspect +{ + /** + * @deprecated since 8.3RC1, use {@link #AbstractCache(CacheConfiguration)} instead + */ + @Deprecated(since = "8.3RC1") + public AbstractCache.new() { + this(null); + } +}