diff options
author | Martin Schreier <martin_s@apache.org> | 2022-01-03 20:26:49 +0100 |
---|---|---|
committer | Martin Schreier <martin_s@apache.org> | 2022-01-03 20:26:49 +0100 |
commit | 3756ba57f6ebc5e3d256c25c220ae5b83f41eb22 (patch) | |
tree | ff296873916765fc05db680adbcd62e416295038 /archiva-modules/archiva-base | |
parent | 7536a89125adca6dcf230d91b6a867d8d5b6e407 (diff) | |
download | archiva-3756ba57f6ebc5e3d256c25c220ae5b83f41eb22.tar.gz archiva-3756ba57f6ebc5e3d256c25c220ae5b83f41eb22.zip |
Switching to generics for cache implementation
Diffstat (limited to 'archiva-modules/archiva-base')
5 files changed, 10 insertions, 3 deletions
diff --git a/archiva-modules/archiva-base/archiva-configuration/src/test/resources/spring-context.xml b/archiva-modules/archiva-base/archiva-configuration/src/test/resources/spring-context.xml index 46b2f71d8..4eb7b5be6 100755 --- a/archiva-modules/archiva-base/archiva-configuration/src/test/resources/spring-context.xml +++ b/archiva-modules/archiva-base/archiva-configuration/src/test/resources/spring-context.xml @@ -324,6 +324,8 @@ </bean> <bean name="cache#url-failures-cache" class="org.apache.archiva.components.cache.ehcache.EhcacheCache"> + <constructor-arg index="0" value="java.lang.String"/> + <constructor-arg index="1" value="java.util.Date"/> <property name="diskExpiryThreadIntervalSeconds" value="600"/> <property name="diskPersistent" value="false"/> <property name="eternal" value="false"/> diff --git a/archiva-modules/archiva-base/archiva-policies/src/main/resources/META-INF/spring-context.xml b/archiva-modules/archiva-base/archiva-policies/src/main/resources/META-INF/spring-context.xml index e42a9b8e7..2a9dc119e 100644 --- a/archiva-modules/archiva-base/archiva-policies/src/main/resources/META-INF/spring-context.xml +++ b/archiva-modules/archiva-base/archiva-policies/src/main/resources/META-INF/spring-context.xml @@ -37,6 +37,8 @@ <bean name="cache#url-failures-cache" class="org.apache.archiva.components.cache.ehcache.EhcacheCache" lazy-init="true" destroy-method="dispose"> + <constructor-arg index="0" value="java.lang.String"/> + <constructor-arg index="1" value="java.util.Date"/> <property name="diskExpiryThreadIntervalSeconds" value="600"/> <property name="diskPersistent" value="true"/> <property name="diskStorePath" value="${appserver.base}/tmp/urlcache"/> diff --git a/archiva-modules/archiva-base/archiva-policies/src/test/resources/spring-context.xml b/archiva-modules/archiva-base/archiva-policies/src/test/resources/spring-context.xml index 91426974c..dfe404519 100755 --- a/archiva-modules/archiva-base/archiva-policies/src/test/resources/spring-context.xml +++ b/archiva-modules/archiva-base/archiva-policies/src/test/resources/spring-context.xml @@ -30,6 +30,8 @@ <context:property-placeholder system-properties-mode="OVERRIDE"/> <bean name="cache#url-failures-cache" class="org.apache.archiva.components.cache.ehcache.EhcacheCache"> + <constructor-arg index="0" value="java.lang.String"/> + <constructor-arg index="1" value="java.util.Date"/> <property name="diskExpiryThreadIntervalSeconds" value="600"/> <property name="diskPersistent" value="false"/> <property name="eternal" value="false"/> diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java index da240c111..7a8a98291 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java @@ -109,7 +109,7 @@ public class DefaultManagedRepositoryAdmin @Inject @Named(value = "cache#namespaces") - private Cache<String, Collection<String>> namespacesCache; + private Cache<String, List<String>> namespacesCache; @Inject private IndexManagerFactory indexManagerFactory; diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/runtime/DefaultRedbackRuntimeConfigurationAdmin.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/runtime/DefaultRedbackRuntimeConfigurationAdmin.java index 1ed25d946..d15990189 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/runtime/DefaultRedbackRuntimeConfigurationAdmin.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/runtime/DefaultRedbackRuntimeConfigurationAdmin.java @@ -34,6 +34,7 @@ import org.apache.archiva.configuration.util.ConfigMapper; import org.apache.archiva.redback.configuration.UserConfiguration; import org.apache.archiva.redback.configuration.UserConfigurationException; import org.apache.archiva.redback.configuration.UserConfigurationKeys; +import org.apache.archiva.redback.users.User; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -100,13 +101,13 @@ public class DefaultRedbackRuntimeConfigurationAdmin LDAP_MAPPER.addBooleanMapping( LDAP_BIND_AUTHENTICATOR_ENABLED, LdapConfiguration::isBindAuthenticatorEnabled ); } - private Cache usersCache; + private Cache<String, User> usersCache; @Inject public DefaultRedbackRuntimeConfigurationAdmin( ArchivaConfiguration archivaConfiguration,// @Named( value = "userConfiguration#redback" ) // UserConfiguration userConfiguration, - @Named( value = "cache#users" ) Cache usersCache ) + @Named( value = "cache#users" ) Cache<String, User> usersCache ) { this.archivaConfiguration = archivaConfiguration; this.userConfiguration = userConfiguration; |