]> source.dussan.org Git - archiva.git/commitdiff
Reducing compiler warnings
authorMartin Stockhammer <martin_s@apache.org>
Sun, 1 Apr 2018 16:30:12 +0000 (18:30 +0200)
committerMartin Stockhammer <martin_s@apache.org>
Sun, 1 Apr 2018 16:45:33 +0000 (18:45 +0200)
20 files changed:
archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/FileTypes.java
archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/archiva/configuration/functors/ProxyConnectorConfigurationOrderComparatorTest.java
archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/pom.xml
archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/repository/mock/RepositoryProviderMock.java
archiva-modules/archiva-base/archiva-maven2-indexer/pom.xml
archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/repository/mock/RepositoryProviderMock.java
archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/mock/MavenIndexContextMock.java
archiva-modules/archiva-scheduler/archiva-scheduler-repository-api/pom.xml
archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/AbstractArchivaRepositoryScanningTaskExecutorTest.java
archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultArchivaAdministrationService.java
archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultBrowseService.java
archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoriesService.java
archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultSystemStatusService.java
archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/utils/AddAdminRepoConsumerClosure.java
archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultFileUploadService.java
archiva-modules/archiva-web/archiva-webdav/pom.xml
archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResource.java
archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java
archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaVirtualDavResource.java
archiva-modules/plugins/maven2-repository/pom.xml

index 6eae941c4f9d32283fafd02b91bdf907a04c1f3c..c5d8931eead1354d86a68bc6d1244b3d96cdbe31 100644 (file)
@@ -27,6 +27,7 @@ import org.apache.archiva.redback.components.registry.RegistryException;
 import org.apache.archiva.redback.components.registry.RegistryListener;
 import org.apache.archiva.redback.components.registry.commons.CommonsConfigurationRegistry;
 import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.collections4.IterableUtils;
 import org.apache.commons.collections4.Predicate;
 import org.apache.commons.configuration.CombinedConfiguration;
 import org.apache.tools.ant.types.selectors.SelectorUtils;
@@ -102,7 +103,7 @@ public class FileTypes
         if ( repositoryScanningConfiguration != null )
         {
             FileType filetype =
-                (FileType) CollectionUtils.find( config.getRepositoryScanning().getFileTypes(), selectedFiletype );
+                IterableUtils.find( config.getRepositoryScanning().getFileTypes(), selectedFiletype );
 
             if ( ( filetype != null ) && CollectionUtils.isNotEmpty( filetype.getPatterns() ) )
             {
index 1de2ce6f0f52d550b57758101ac1448ce8de3251..d5dc6f5838ce7ac05adc9d3a4c2081caa3f2563f 100644 (file)
               org.springframework*;version="[3,4)",
               org.apache.archiva.redback.components.registry,
               org.apache.archiva.metadata.model*;version=${project.version},
-              org.apache.archiva.metadata.repository.storage.maven2*;version=${project.version},
               org.slf4j;resolution:=optional
             </Import-Package>
           </instructions>
index af3597e2104527b41c57fb0468f524e978696fad..303fd765375c1e0d186fd976974f70ccaff64ed3 100644 (file)
@@ -143,6 +143,7 @@ public class RepositoryProviderMock implements RepositoryProvider
         return remoteRepository;
     }
 
+    @SuppressWarnings("unchecked")
     @Override
     public void updateRemoteInstance( EditableRemoteRepository remoteRepository, RemoteRepositoryConfiguration configuration ) throws RepositoryException
     {
@@ -175,7 +176,7 @@ public class RepositoryProviderMock implements RepositoryProvider
     }
 
     @Override
-    public ManagedRepositoryConfiguration getManagedConfiguration( ManagedRepository managedRepository ) throws RepositoryException
+    public ManagedRepositoryConfiguration getManagedConfiguration( ManagedRepository managedRepository )
     {
         ManagedRepositoryConfiguration configuration = new ManagedRepositoryConfiguration( );
         configuration.setId( managedRepository.getId( ) );
@@ -202,7 +203,7 @@ public class RepositoryProviderMock implements RepositoryProvider
 
 
     @Override
-    public RemoteRepositoryConfiguration getRemoteConfiguration( RemoteRepository remoteRepository ) throws RepositoryException
+    public RemoteRepositoryConfiguration getRemoteConfiguration( RemoteRepository remoteRepository )
     {
         RemoteRepositoryConfiguration configuration = new RemoteRepositoryConfiguration( );
         configuration.setId( remoteRepository.getId( ) );
index 2a2e1c4d0d8a72db31d64ac3b80874f41fa9a615..de6700c324a061c811828959a378c79dc57ec213 100644 (file)
               org.apache.archiva.common.plexusbridge;version=${project.version},
               org.apache.commons.io;version="[1.4,2)",
               org.apache.commons.lang*;version="[2.4,3)",
-              org.apache.lucene*;version="[3,4)",
               org.springframework*;version="[3,4)",
               org.apache.maven.index*,
               org.apache.archiva.redback.components.scheduler,
index dafcae9c83ddd9ac8e4f6569cb75f8f53af4388a..691d7eefad638ddef651b1ef9d23c98bb2e54742 100644 (file)
@@ -143,6 +143,7 @@ public class RepositoryProviderMock implements RepositoryProvider
         return remoteRepository;
     }
 
+    @SuppressWarnings("unchecked")
     @Override
     public void updateRemoteInstance( EditableRemoteRepository remoteRepository, RemoteRepositoryConfiguration configuration ) throws RepositoryException
     {
index 1b6a54b01d763b01b4c3507cde9a407cbab250e2..3bed602930333d79798c74436b6bde5c91140627 100644 (file)
@@ -108,6 +108,7 @@ public class MavenIndexContextMock implements ArchivaIndexingContext {
         return IndexingContext.class.equals(clazz);
     }
 
+    @SuppressWarnings( "unchecked" )
     @Override
     public <T> T getBaseContext(Class<T> clazz) throws UnsupportedOperationException {
         if (IndexingContext.class.equals(clazz)) {
index e728a8b30f4260d18dc7664aceaa15c4270e1ff9..3ff1e109ead5aa998ffe1f308489c9e5741b702c 100644 (file)
               org.apache.archiva.admin.model.managed;version=${project.version},
               org.apache.archiva.common;version=${project.version},
               org.apache.archiva.configuration;version=${project.version},
-              org.apache.archiva.metadata.repository*;version=${project.version},
               org.apache.archiva.repository.scanner;version=${project.version},
               org.apache.archiva.scheduler;version=${project.version},
               org.apache.commons.lang;version="[2.4,3)",
               org.codehaus.plexus.personality.plexus.lifecycle.phase,
               org.apache.archiva.redback.components.taskqueue*,
               org.apache.archiva.redback.components.scheduler,
-              org.quartz*;version="[2,3)",
-              org.springframework*;version="[3,4)",
               org.slf4j;resolution:=optional
             </Import-Package>
           </instructions>
index 9b31305caf2858223d0b9f51145d354c180ad38a..78d3e0ae8ade557378805e4245a1dbd13c9288d5 100644 (file)
@@ -28,6 +28,7 @@ import org.apache.archiva.mock.MockRepositorySessionFactory;
 import org.apache.archiva.redback.components.taskqueue.execution.TaskExecutor;
 import org.apache.archiva.repository.ManagedRepository;
 import org.apache.archiva.repository.RepositoryRegistry;
+import org.apache.archiva.scheduler.repository.model.RepositoryTask;
 import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner;
 import org.codehaus.plexus.util.FileUtils;
 import org.junit.After;
@@ -66,7 +67,7 @@ public abstract class AbstractArchivaRepositoryScanningTaskExecutorTest
 
     @Inject
     @Named( value = "taskExecutor#test-repository-scanning" )
-    protected TaskExecutor taskExecutor;
+    protected TaskExecutor<RepositoryTask> taskExecutor;
 
     @Inject
     @Named( value = "archivaConfiguration#test-repository-scanning" )
index 56235d6f6d3f9db70247991fb621459472eadbc2..f13cd46dd2c66d675c3963fff51fe053839f8050 100644 (file)
@@ -31,7 +31,6 @@ import org.apache.archiva.rest.api.services.ArchivaAdministrationService;
 import org.apache.archiva.rest.api.services.ArchivaRestServiceException;
 import org.apache.archiva.rest.services.utils.AddAdminRepoConsumerClosure;
 import org.apache.archiva.rest.services.utils.AdminRepositoryConsumerComparator;
-import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.collections4.IterableUtils;
 import org.apache.commons.lang.StringUtils;
 import org.springframework.stereotype.Service;
@@ -274,7 +273,7 @@ public class DefaultArchivaAdministrationService
     {
         try
         {
-            return new ArrayList<String>( archivaAdministration.getKnownContentConsumers() );
+            return new ArrayList<>( archivaAdministration.getKnownContentConsumers( ) );
         }
         catch ( RepositoryAdminException e )
         {
@@ -288,7 +287,7 @@ public class DefaultArchivaAdministrationService
     {
         try
         {
-            return new ArrayList<String>( archivaAdministration.getInvalidContentConsumers() );
+            return new ArrayList<>( archivaAdministration.getInvalidContentConsumers( ) );
         }
         catch ( RepositoryAdminException e )
         {
@@ -415,7 +414,7 @@ public class DefaultArchivaAdministrationService
                 new AddAdminRepoConsumerClosure( archivaAdministration.getKnownContentConsumers() );
             IterableUtils.forEach( repoConsumerUtil.getAvailableKnownConsumers(), addAdminRepoConsumer );
             List<AdminRepositoryConsumer> knownContentConsumers = addAdminRepoConsumer.getList();
-            Collections.sort( knownContentConsumers, AdminRepositoryConsumerComparator.getInstance() );
+            knownContentConsumers.sort( AdminRepositoryConsumerComparator.getInstance( ) );
             return knownContentConsumers;
         }
         catch ( RepositoryAdminException e )
@@ -434,7 +433,7 @@ public class DefaultArchivaAdministrationService
                 new AddAdminRepoConsumerClosure( archivaAdministration.getInvalidContentConsumers() );
             IterableUtils.forEach( repoConsumerUtil.getAvailableInvalidConsumers(), addAdminRepoConsumer );
             List<AdminRepositoryConsumer> invalidContentConsumers = addAdminRepoConsumer.getList();
-            Collections.sort( invalidContentConsumers, AdminRepositoryConsumerComparator.getInstance() );
+            invalidContentConsumers.sort( AdminRepositoryConsumerComparator.getInstance( ) );
             return invalidContentConsumers;
         }
         catch ( RepositoryAdminException e )
index 0e3a7773589be41df578b088b2a20a9f53e76877..34800ff4f5296bb74aa4d9a05495589a38695451 100644 (file)
@@ -94,7 +94,7 @@ public class DefaultBrowseService
     implements BrowseService
 {
 
-    private Charset ARTIFACT_CONTENT_ENCODING=Charset.forName( "UTF-8" );
+    private final Charset ARTIFACT_CONTENT_ENCODING=Charset.forName( "UTF-8" );
 
     @Inject
     private DependencyTreeBuilder dependencyTreeBuilder;
@@ -1269,12 +1269,12 @@ public class DefaultBrowseService
         }
     }
 
-    public Cache getVersionMetadataCache()
+    public Cache<String, ProjectVersionMetadata> getVersionMetadataCache()
     {
         return versionMetadataCache;
     }
 
-    public void setVersionMetadataCache( Cache versionMetadataCache )
+    public void setVersionMetadataCache( Cache<String, ProjectVersionMetadata> versionMetadataCache )
     {
         this.versionMetadataCache = versionMetadataCache;
     }
index c8ae783f196605ad49b2a9c42c73b17cd9dd4745..b0b4119b001a4183025a1bad1b0f86e030ec2f04 100644 (file)
@@ -131,7 +131,7 @@ public class DefaultRepositoriesService
 
     @Inject
     @Named(value = "archivaTaskScheduler#repository")
-    private ArchivaTaskScheduler scheduler;
+    private ArchivaTaskScheduler<RepositoryTask> scheduler;
 
     @Inject
     private DownloadRemoteIndexScheduler downloadRemoteIndexScheduler;
index fdacd992b21023d8290136605db8be799f91734f..82f92dcb84373a5a2bb717cb01488a38cd891829 100644 (file)
@@ -42,6 +42,7 @@ import java.text.DecimalFormat;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Collections;
+import java.util.Comparator;
 import java.util.Date;
 import java.util.List;
 import java.util.Locale;
@@ -130,6 +131,17 @@ public class DefaultSystemStatusService
         }
     }
 
+    // Used for generics
+    private class CacheEntryComparator implements Comparator<CacheEntry>
+    {
+
+        @Override
+        public int compare( CacheEntry o1, CacheEntry o2 )
+        {
+            return o1.compareTo( o2 );
+        }
+    }
+
     @Override
     public List<CacheEntry> getCacheEntries()
         throws ArchivaRestServiceException
@@ -147,7 +159,7 @@ public class DefaultSystemStatusService
                                               cacheStatistics.getInMemorySize() ) );
         }
 
-        Collections.sort( cacheEntries );
+        Collections.sort( cacheEntries, new CacheEntryComparator() );
 
         return cacheEntries;
     }
index b757819f89e47e6006c9a16165d52f3e2ba6024d..311394981c4f560ab07d2ffc1a648f7f132b74b9 100644 (file)
@@ -27,14 +27,12 @@ import java.util.ArrayList;
 import java.util.List;
 
 /**
- * AddAdminRepoConsumerClosure 
- *
- *
+ * AddAdminRepoConsumerClosure
  */
 public class AddAdminRepoConsumerClosure
-    implements Closure
+    implements Closure<RepositoryContentConsumer>
 {
-    private List<AdminRepositoryConsumer> list = new ArrayList<>();
+    private List<AdminRepositoryConsumer> list = new ArrayList<>( );
 
     private List<String> selectedIds;
 
@@ -44,23 +42,20 @@ public class AddAdminRepoConsumerClosure
     }
 
     @Override
-    public void execute( Object input )
+    public void execute( RepositoryContentConsumer input )
     {
-        if ( input instanceof RepositoryContentConsumer )
-        {
-            RepositoryContentConsumer consumer = (RepositoryContentConsumer) input;
+        RepositoryContentConsumer consumer = (RepositoryContentConsumer) input;
 
-            boolean enabled = this.selectedIds.contains( consumer.getId() );
-            AdminRepositoryConsumer adminconsumer = new AdminRepositoryConsumer();
-            adminconsumer.setEnabled( enabled );
-            adminconsumer.setId( consumer.getId() );
-            adminconsumer.setDescription( consumer.getDescription() );
+        boolean enabled = this.selectedIds.contains( consumer.getId( ) );
+        AdminRepositoryConsumer adminconsumer = new AdminRepositoryConsumer( );
+        adminconsumer.setEnabled( enabled );
+        adminconsumer.setId( consumer.getId( ) );
+        adminconsumer.setDescription( consumer.getDescription( ) );
 
-            list.add( adminconsumer );
-        }
+        list.add( adminconsumer );
     }
 
-    public List<AdminRepositoryConsumer> getList()
+    public List<AdminRepositoryConsumer> getList( )
     {
         return list;
     }
index 5e1c69ac94a284ad64298a324b96cbe36d4f29a2..3a05d8fb9de2c3f81cde9338ff38033a0cfc31b4 100644 (file)
@@ -110,13 +110,13 @@ public class DefaultFileUploadService
 
     @Inject
     @Named(value = "archivaTaskScheduler#repository")
-    private ArchivaTaskScheduler scheduler;
+    private ArchivaTaskScheduler<RepositoryTask> scheduler;
 
     private String getStringValue( MultipartBody multipartBody, String attachmentId )
         throws IOException
     {
         Attachment attachment = multipartBody.getAttachment( attachmentId );
-        return attachment == null ? "" : IOUtils.toString( attachment.getDataHandler().getInputStream() );
+        return attachment == null ? "" : IOUtils.toString( attachment.getDataHandler().getInputStream(), "UTF-8" );
     }
 
     @Override
@@ -171,8 +171,7 @@ public class DefaultFileUploadService
      */
     protected synchronized List<FileMetadata> getSessionFilesList()
     {
-        List<FileMetadata> fileMetadatas =
-            (List<FileMetadata>) httpServletRequest.getSession().getAttribute( FILES_SESSION_KEY );
+        @SuppressWarnings("unchecked") List<FileMetadata> fileMetadatas = (List<FileMetadata>) httpServletRequest.getSession().getAttribute( FILES_SESSION_KEY );
         if ( fileMetadatas == null )
         {
             fileMetadatas = new CopyOnWriteArrayList<>();
@@ -208,7 +207,7 @@ public class DefaultFileUploadService
     public Boolean clearUploadedFiles()
         throws ArchivaRestServiceException
     {
-        List<FileMetadata> fileMetadatas = new ArrayList( getSessionFileMetadatas() );
+        List<FileMetadata> fileMetadatas = new ArrayList<>( getSessionFileMetadatas() );
         for ( FileMetadata fileMetadata : fileMetadatas )
         {
             deleteFile( Paths.get( fileMetadata.getServerFileName() ).toString() );
@@ -221,7 +220,7 @@ public class DefaultFileUploadService
     public List<FileMetadata> getSessionFileMetadatas()
         throws ArchivaRestServiceException
     {
-        List<FileMetadata> fileMetadatas =
+        @SuppressWarnings("unchecked") List<FileMetadata> fileMetadatas =
             (List<FileMetadata>) httpServletRequest.getSession().getAttribute( FILES_SESSION_KEY );
 
         return fileMetadatas == null ? Collections.<FileMetadata>emptyList() : fileMetadatas;
index 0dc99c9e82d2bf423e6845295a8552b3be41d70c..717074c1b921fb87b847923e624de3d46039efa0 100644 (file)
               org.joda.time*;version="[1.5,2)",
               org.springframework*;version="[3,4)",
               org.apache.maven.index*,
-              org.apache.maven.model*,
               org.codehaus.plexus.digest,
               org.apache.archiva.redback.*,
               org.apache.archiva.redback.components.taskqueue,
-              org.codehaus.plexus.util*,
               org.apache.archiva.common.filelock,
               org.codehaus.redback.integration.filter.authentication,
               org.slf4j;resolution:=optional,
index c13f03939c1f5f123b2a725116c7c15bbe2b8875..21c589a878c09b479c6392b5c66b78beaca92487 100644 (file)
@@ -106,7 +106,7 @@ public class ArchivaDavResource
 
     public static final String COMPLIANCE_CLASS = "1, 2";
 
-    private final ArchivaTaskScheduler scheduler;
+    private final ArchivaTaskScheduler<RepositoryTask> scheduler;
 
     private final FileLockManager fileLockManager;
 
@@ -677,20 +677,20 @@ public class ArchivaDavResource
         // set (or reset) fundamental properties
         if ( getDisplayName() != null )
         {
-            properties.add( new DefaultDavProperty( DavPropertyName.DISPLAYNAME, getDisplayName() ) );
+            properties.add( new DefaultDavProperty<>( DavPropertyName.DISPLAYNAME, getDisplayName() ) );
         }
         if ( isCollection() )
         {
             properties.add( new ResourceType( ResourceType.COLLECTION ) );
             // Windows XP support
-            properties.add( new DefaultDavProperty( DavPropertyName.ISCOLLECTION, "1" ) );
+            properties.add( new DefaultDavProperty<>( DavPropertyName.ISCOLLECTION, "1" ) );
         }
         else
         {
             properties.add( new ResourceType( ResourceType.DEFAULT_RESOURCE ) );
 
             // Windows XP support
-            properties.add( new DefaultDavProperty( DavPropertyName.ISCOLLECTION, "0" ) );
+            properties.add( new DefaultDavProperty<>( DavPropertyName.ISCOLLECTION, "0" ) );
         }
 
         // Need to get the ISO8601 date for properties
@@ -707,18 +707,18 @@ public class ArchivaDavResource
         DateTimeFormatter fmt = ISODateTimeFormat.dateTime();
         String modifiedDate = fmt.print( dt );
 
-        properties.add( new DefaultDavProperty( DavPropertyName.GETLASTMODIFIED, modifiedDate ) );
+        properties.add( new DefaultDavProperty<>( DavPropertyName.GETLASTMODIFIED, modifiedDate ) );
 
-        properties.add( new DefaultDavProperty( DavPropertyName.CREATIONDATE, modifiedDate ) );
+        properties.add( new DefaultDavProperty<>( DavPropertyName.CREATIONDATE, modifiedDate ) );
 
         try
         {
-            properties.add( new DefaultDavProperty( DavPropertyName.GETCONTENTLENGTH, Files.size(localResource) ) );
+            properties.add( new DefaultDavProperty<>( DavPropertyName.GETCONTENTLENGTH, Files.size(localResource) ) );
         }
         catch ( IOException e )
         {
             log.error("Could not get file size of {}: {}", localResource, e.getMessage(), e);
-            properties.add( new DefaultDavProperty( DavPropertyName.GETCONTENTLENGTH, 0 ) );
+            properties.add( new DefaultDavProperty<>( DavPropertyName.GETCONTENTLENGTH, 0 ) );
         }
 
         this.properties = properties;
index 62e510056d7aba7114a2a46916117a4f4910d242..c48231b1a9fe2183b45096aadfcd0fc4ef1ec999 100644 (file)
@@ -242,21 +242,14 @@ public class ArchivaDavResourceFactory
             // handle browse requests for virtual repos
             if ( getLogicalResource( archivaLocator, null, true ).endsWith( "/" ) )
             {
-                try
-                {
-                    DavResource davResource =
-                        getResourceFromGroup( request, repoGroupConfig.getRepositories(), archivaLocator,
-                                              repoGroupConfig );
+                DavResource davResource =
+                    getResourceFromGroup( request, repoGroupConfig.getRepositories(), archivaLocator,
+                                          repoGroupConfig );
 
-                    setHeaders( response, locator, davResource, true );
+                setHeaders( response, locator, davResource, true );
 
-                    return davResource;
+                return davResource;
 
-                }
-                catch ( RepositoryAdminException e )
-                {
-                    throw new DavException( HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e );
-                }
             }
             else
             {
@@ -999,7 +992,7 @@ public class ArchivaDavResourceFactory
     private DavResource getResourceFromGroup( DavServletRequest request, List<String> repositories,
                                               ArchivaDavResourceLocator locator,
                                               RepositoryGroupConfiguration repositoryGroupConfiguration )
-        throws DavException, RepositoryAdminException
+        throws DavException
     {
         if ( repositoryGroupConfiguration.getRepositories() == null
             || repositoryGroupConfiguration.getRepositories().isEmpty() )
@@ -1299,7 +1292,7 @@ public class ArchivaDavResourceFactory
         {
             HttpSession session = request.getSession();
 
-            Map<String, TemporaryGroupIndex> temporaryGroupIndexMap =
+            @SuppressWarnings( "unchecked" ) Map<String, TemporaryGroupIndex> temporaryGroupIndexMap =
                 (Map<String, TemporaryGroupIndex>) session.getAttribute(
                     TemporaryGroupIndexSessionCleaner.TEMPORARY_INDEX_SESSION_KEY );
             if ( temporaryGroupIndexMap == null )
index 236be508478b48697e07c83e47c592d79b9af372..a74e80d4d64ac976f33f35f9dee3de9696e12cf0 100644 (file)
@@ -346,20 +346,20 @@ public class ArchivaVirtualDavResource
         // set (or reset) fundamental properties
         if ( getDisplayName() != null )
         {
-            properties.add( new DefaultDavProperty( DavPropertyName.DISPLAYNAME, getDisplayName() ) );
+            properties.add( new DefaultDavProperty<>( DavPropertyName.DISPLAYNAME, getDisplayName() ) );
         }
         if ( isCollection() )
         {
             properties.add( new ResourceType( ResourceType.COLLECTION ) );
             // Windows XP support
-            properties.add( new DefaultDavProperty( DavPropertyName.ISCOLLECTION, "1" ) );
+            properties.add( new DefaultDavProperty<>( DavPropertyName.ISCOLLECTION, "1" ) );
         }
         else
         {
             properties.add( new ResourceType( ResourceType.DEFAULT_RESOURCE ) );
 
             // Windows XP support
-            properties.add( new DefaultDavProperty( DavPropertyName.ISCOLLECTION, "0" ) );
+            properties.add( new DefaultDavProperty<>( DavPropertyName.ISCOLLECTION, "0" ) );
         }
 
         // Need to get the ISO8601 date for properties
@@ -367,11 +367,11 @@ public class ArchivaVirtualDavResource
         DateTimeFormatter fmt = ISODateTimeFormat.dateTime();
         String modifiedDate = fmt.print( dt );
 
-        properties.add( new DefaultDavProperty( DavPropertyName.GETLASTMODIFIED, modifiedDate ) );
+        properties.add( new DefaultDavProperty<>( DavPropertyName.GETLASTMODIFIED, modifiedDate ) );
 
-        properties.add( new DefaultDavProperty( DavPropertyName.CREATIONDATE, modifiedDate ) );
+        properties.add( new DefaultDavProperty<>( DavPropertyName.CREATIONDATE, modifiedDate ) );
 
-        properties.add( new DefaultDavProperty( DavPropertyName.GETCONTENTLENGTH, 0 ) );
+        properties.add( new DefaultDavProperty<>( DavPropertyName.GETCONTENTLENGTH, 0 ) );
 
         propsInitialized = true;
     }
index bf4a7244c1efa87ca337e1fa33b08c4fd4453972..b151a4efb31440a9f71fc212fb027d6d7965d107 100644 (file)
               org.apache.archiva.admin.model.proxyconnector;version=${project.version},
               org.apache.archiva.admin.model.remote;version=${project.version},
               org.apache.commons.collections;version="[3.2,4)",
-              org.apache.commons.io*;version="[1.4,2)",
               org.apache.commons.configuration;version="[1.4,2)",
               org.apache.commons.lang*;version="[2.4,3)",
               org.apache.maven.artifact*,