aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/DefaultArchivaConfiguration.java2
-rw-r--r--archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/functors/ProxyConnectorSelectionPredicate.java4
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/pom.xml1
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/pom.xml1
-rw-r--r--archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/urlcache/DefaultUrlFailureCache.java4
-rw-r--r--archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/RepositoryRegistry.java15
-rw-r--r--archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/java/org/apache/archiva/scheduler/repository/DefaultRepositoryArchivaTaskScheduler.java2
-rw-r--r--archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/java/org/apache/archiva/scheduler/repository/RepositoryTaskJob.java1
-rw-r--r--archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaConfigurableUsersManager.java12
9 files changed, 25 insertions, 17 deletions
diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/DefaultArchivaConfiguration.java b/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/DefaultArchivaConfiguration.java
index c19d12f7d..86e96a5dd 100644
--- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/DefaultArchivaConfiguration.java
+++ b/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/DefaultArchivaConfiguration.java
@@ -98,7 +98,7 @@ import java.util.Set;
public class DefaultArchivaConfiguration
implements ArchivaConfiguration, RegistryListener
{
- private Logger log = LoggerFactory.getLogger( DefaultArchivaConfiguration.class );
+ private final Logger log = LoggerFactory.getLogger( DefaultArchivaConfiguration.class );
private static String FILE_ENCODING = "UTF-8";
diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/functors/ProxyConnectorSelectionPredicate.java b/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/functors/ProxyConnectorSelectionPredicate.java
index 209f75ad5..535db8193 100644
--- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/functors/ProxyConnectorSelectionPredicate.java
+++ b/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/functors/ProxyConnectorSelectionPredicate.java
@@ -46,9 +46,9 @@ public class ProxyConnectorSelectionPredicate
{
boolean satisfies = false;
- if ( object instanceof ProxyConnectorConfiguration )
+ if ( object != null )
{
- ProxyConnectorConfiguration connector = (ProxyConnectorConfiguration) object;
+ ProxyConnectorConfiguration connector = object;
return ( StringUtils.equals( sourceId, connector.getSourceRepoId() ) && StringUtils.equals( targetId,
connector.getTargetRepoId() ) );
}
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/pom.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/pom.xml
index d5dc6f583..277bd2a29 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/pom.xml
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/pom.xml
@@ -212,7 +212,6 @@
<Import-Package>
javax.annotation,
javax.inject,
- org.apache.archiva.admin.model*;version=${project.version},
org.apache.archiva.checksum;version=${project.version},
org.apache.archiva.common.utils;version=${project.version},
org.apache.archiva.configuration;version=${project.version},
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/pom.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/pom.xml
index bb489a215..1052ad866 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/pom.xml
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/pom.xml
@@ -157,7 +157,6 @@
<Import-Package>
javax.annotation,
javax.inject,
- org.apache.archiva.admin.model*;version=${project.version},
org.apache.archiva.common.plexusbridge;version=${project.version},
org.apache.archiva.configuration;version=${project.version},
org.apache.archiva.consumers;version=${project.version},
diff --git a/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/urlcache/DefaultUrlFailureCache.java b/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/urlcache/DefaultUrlFailureCache.java
index 052b549fe..1bf1e50ad 100644
--- a/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/urlcache/DefaultUrlFailureCache.java
+++ b/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/archiva/policies/urlcache/DefaultUrlFailureCache.java
@@ -33,10 +33,10 @@ import java.util.Date;
public class DefaultUrlFailureCache
implements UrlFailureCache
{
- private Cache urlCache;
+ private Cache<String, Date> urlCache;
@Inject
- public DefaultUrlFailureCache( @Named( "cache#url-failures-cache" ) Cache urlCache )
+ public DefaultUrlFailureCache( @Named( "cache#url-failures-cache" ) Cache<String, Date> urlCache )
{
this.urlCache = urlCache;
}
diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/RepositoryRegistry.java b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/RepositoryRegistry.java
index 061133f1e..73114fcfb 100644
--- a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/RepositoryRegistry.java
+++ b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/RepositoryRegistry.java
@@ -195,7 +195,7 @@ public class RepositoryRegistry implements ConfigurationListener, RepositoryEven
} catch (Throwable e) {
log.error("Could not initialize repositories from config: {}",e.getMessage(), e );
//noinspection unchecked
- return Collections.EMPTY_MAP;
+ return Collections.emptyMap();
}
}
@@ -209,6 +209,7 @@ public class RepositoryRegistry implements ConfigurationListener, RepositoryEven
}
+ @SuppressWarnings( "unchecked" )
private void updateRepositoryReferences(RepositoryProvider provider, ManagedRepository repo, ManagedRepositoryConfiguration cfg, Configuration configuration) throws RepositoryException
{
log.debug("Updating references of repo {}",repo.getId());
@@ -284,7 +285,7 @@ public class RepositoryRegistry implements ConfigurationListener, RepositoryEven
if ( remoteRepoConfigs == null )
{
//noinspection unchecked
- return Collections.EMPTY_MAP;
+ return Collections.emptyMap();
}
Map<String, RemoteRepository> remoteRepos = new LinkedHashMap<>( remoteRepoConfigs.size( ) );
@@ -313,7 +314,7 @@ public class RepositoryRegistry implements ConfigurationListener, RepositoryEven
} catch (Throwable e) {
log.error("Could not initialize remote repositories from config: {}", e.getMessage(), e);
//noinspection unchecked
- return Collections.EMPTY_MAP;
+ return Collections.emptyMap();
}
}
@@ -327,6 +328,7 @@ public class RepositoryRegistry implements ConfigurationListener, RepositoryEven
}
+ @SuppressWarnings( "unchecked" )
private void updateRepositoryReferences( RepositoryProvider provider, RemoteRepository repo, RemoteRepositoryConfiguration cfg, Configuration configuration) throws RepositoryException
{
if ( repo instanceof EditableRemoteRepository && repo.getContent() == null)
@@ -570,6 +572,7 @@ public class RepositoryRegistry implements ConfigurationListener, RepositoryEven
* @return the new or updated repository
* @throws RepositoryException if the configuration cannot be saved or updated
*/
+ @SuppressWarnings( "unchecked" )
public ManagedRepository putRepository( ManagedRepositoryConfiguration managedRepositoryConfiguration, Configuration configuration) throws RepositoryException
{
rwLock.writeLock( ).lock( );
@@ -751,6 +754,7 @@ public class RepositoryRegistry implements ConfigurationListener, RepositoryEven
* @return the new or updated repository
* @throws RepositoryException if the configuration cannot be saved or updated
*/
+ @SuppressWarnings( "unchecked" )
public RemoteRepository putRepository( RemoteRepositoryConfiguration remoteRepositoryConfiguration, Configuration configuration) throws RepositoryException
{
rwLock.writeLock( ).lock( );
@@ -791,6 +795,8 @@ public class RepositoryRegistry implements ConfigurationListener, RepositoryEven
removeRepository(repo);
}
}
+
+ @SuppressWarnings( "unchecked" )
public void removeRepository(Repository repo) throws RepositoryException
{
if (repo instanceof RemoteRepository ) {
@@ -946,6 +952,7 @@ public class RepositoryRegistry implements ConfigurationListener, RepositoryEven
* @param repo
* @throws IndexUpdateFailedException
*/
+ @SuppressWarnings( "unchecked" )
public void resetIndexingContext(Repository repo) throws IndexUpdateFailedException {
if (repo.hasIndex() && repo instanceof EditableRepository) {
EditableRepository eRepo = (EditableRepository) repo;
@@ -975,6 +982,7 @@ public class RepositoryRegistry implements ConfigurationListener, RepositoryEven
return cloned;
}
+ @SuppressWarnings( "unchecked" )
public <T extends Repository> Repository clone(T repo, String newId) throws RepositoryException {
if (repo instanceof RemoteRepository ) {
return this.clone((RemoteRepository)repo, newId);
@@ -1029,6 +1037,7 @@ public class RepositoryRegistry implements ConfigurationListener, RepositoryEven
this.listeners.clear();
}
+ @SuppressWarnings( "unchecked" )
@Override
public <T> void raise(RepositoryEvent<T> event) {
if (event instanceof IndexCreationEvent ) {
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/java/org/apache/archiva/scheduler/repository/DefaultRepositoryArchivaTaskScheduler.java b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/java/org/apache/archiva/scheduler/repository/DefaultRepositoryArchivaTaskScheduler.java
index 18c775e57..4da5b23b7 100644
--- a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/java/org/apache/archiva/scheduler/repository/DefaultRepositoryArchivaTaskScheduler.java
+++ b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/java/org/apache/archiva/scheduler/repository/DefaultRepositoryArchivaTaskScheduler.java
@@ -73,7 +73,7 @@ public class DefaultRepositoryArchivaTaskScheduler
@Inject
@Named( value = "taskQueue#repository-scanning" )
- private TaskQueue repositoryScanningQueue;
+ private TaskQueue<RepositoryTask> repositoryScanningQueue;
@Inject
private ArchivaConfiguration archivaConfiguration;
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/java/org/apache/archiva/scheduler/repository/RepositoryTaskJob.java b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/java/org/apache/archiva/scheduler/repository/RepositoryTaskJob.java
index 92e5131db..6f97495f2 100644
--- a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/java/org/apache/archiva/scheduler/repository/RepositoryTaskJob.java
+++ b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/java/org/apache/archiva/scheduler/repository/RepositoryTaskJob.java
@@ -39,6 +39,7 @@ public class RepositoryTaskJob
* @param context
* @throws org.quartz.JobExecutionException
*/
+ @SuppressWarnings( "unchecked" )
@Override
public void execute( JobExecutionContext context )
throws JobExecutionException
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaConfigurableUsersManager.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaConfigurableUsersManager.java
index 9ea05cb56..6be59293a 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaConfigurableUsersManager.java
+++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaConfigurableUsersManager.java
@@ -270,7 +270,7 @@ public class ArchivaConfigurableUsersManager
for ( UserManager userManager : userManagerPerId.values() )
{
- List<User> found = userManager.findUsersByEmailKey( emailKey, orderAscending );
+ List<? extends User> found = userManager.findUsersByEmailKey( emailKey, orderAscending );
if ( found != null )
{
users.addAll( found );
@@ -287,7 +287,7 @@ public class ArchivaConfigurableUsersManager
for ( UserManager userManager : userManagerPerId.values() )
{
- List<User> found = userManager.findUsersByFullNameKey( fullNameKey, orderAscending );
+ List<? extends User> found = userManager.findUsersByFullNameKey( fullNameKey, orderAscending );
if ( found != null )
{
users.addAll( found );
@@ -304,7 +304,7 @@ public class ArchivaConfigurableUsersManager
for ( UserManager userManager : userManagerPerId.values() )
{
- List<User> found = userManager.findUsersByQuery( query );
+ List<? extends User> found = userManager.findUsersByQuery( query );
if ( found != null )
{
users.addAll( found );
@@ -321,7 +321,7 @@ public class ArchivaConfigurableUsersManager
for ( UserManager userManager : userManagerPerId.values() )
{
- List<User> found = userManager.findUsersByUsernameKey( usernameKey, orderAscending );
+ List<? extends User> found = userManager.findUsersByUsernameKey( usernameKey, orderAscending );
if ( found != null )
{
users.addAll( found );
@@ -344,7 +344,7 @@ public class ArchivaConfigurableUsersManager
for ( UserManager userManager : userManagerPerId.values() )
{
- List<User> found = userManager.getUsers();
+ List<? extends User> found = userManager.getUsers();
if ( found != null )
{
users.addAll( found );
@@ -361,7 +361,7 @@ public class ArchivaConfigurableUsersManager
for ( UserManager userManager : userManagerPerId.values() )
{
- List<User> found = userManager.getUsers( orderAscending );
+ List<? extends User> found = userManager.getUsers( orderAscending );
if ( found != null )
{
users.addAll( found );