archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marti...@apache.org
Subject archiva git commit: Adding generics and reducing compiler warnings
Date Mon, 02 Apr 2018 15:39:23 GMT
Repository: archiva
Updated Branches:
  refs/heads/master d422c8778 -> 0f400d66a


Adding generics and reducing compiler warnings


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/0f400d66
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/0f400d66
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/0f400d66

Branch: refs/heads/master
Commit: 0f400d66a309e76d55a15e965cb551bfcf7b0b3d
Parents: d422c87
Author: Martin Stockhammer <martin_s@apache.org>
Authored: Mon Apr 2 10:28:31 2018 +0200
Committer: Martin Stockhammer <martin_s@apache.org>
Committed: Mon Apr 2 10:46:34 2018 +0200

----------------------------------------------------------------------
 .../functors/ConsumerWantsFilePredicate.java    | 63 +++++++++--------
 .../scanner/RepositoryContentConsumers.java     |  5 +-
 .../functors/ConsumerProcessFileClosure.java    | 73 ++++++++++----------
 .../functors/TriggerBeginScanClosure.java       | 33 ++++-----
 .../functors/TriggerScanCompletedClosure.java   | 13 ++--
 .../indexing/IndexingArchivaTaskScheduler.java  |  2 +-
 .../maven2/MavenManagedRepository.java          |  3 +
 .../maven2/MavenRepositoryProvider.java         | 10 ++-
 .../plugins/metadata-store-jcr/pom.xml          |  5 ++
 .../repository/jcr/JcrMetadataRepository.java   |  1 +
 10 files changed, 108 insertions(+), 100 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/0f400d66/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-api/src/main/java/org/apache/archiva/consumers/functors/ConsumerWantsFilePredicate.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-api/src/main/java/org/apache/archiva/consumers/functors/ConsumerWantsFilePredicate.java
b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-api/src/main/java/org/apache/archiva/consumers/functors/ConsumerWantsFilePredicate.java
index 53267dc..7011aad 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-api/src/main/java/org/apache/archiva/consumers/functors/ConsumerWantsFilePredicate.java
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-api/src/main/java/org/apache/archiva/consumers/functors/ConsumerWantsFilePredicate.java
@@ -37,7 +37,7 @@ import java.util.List;
  * ConsumerWantsFilePredicate
  */
 public class ConsumerWantsFilePredicate
-    implements Predicate
+    implements Predicate<RepositoryContentConsumer>
 {
     private BaseFile basefile;
 
@@ -49,12 +49,12 @@ public class ConsumerWantsFilePredicate
 
     private ManagedRepository managedRepository;
 
-    private Logger logger = LoggerFactory.getLogger( getClass() );
+    private Logger logger = LoggerFactory.getLogger( getClass( ) );
 
     /**
      * @deprecated use constructor with ManagedRepository
      */
-    public ConsumerWantsFilePredicate()
+    public ConsumerWantsFilePredicate( )
     {
         // no-op
     }
@@ -65,28 +65,25 @@ public class ConsumerWantsFilePredicate
     }
 
     @Override
-    public boolean evaluate( Object object )
+    public boolean evaluate( RepositoryContentConsumer object )
     {
         boolean satisfies = false;
 
-        if ( object instanceof RepositoryContentConsumer )
+        RepositoryContentConsumer consumer = (RepositoryContentConsumer) object;
+        if ( wantsFile( consumer, FilenameUtils.separatorsToUnix( basefile.getRelativePath(
) ) ) )
         {
-            RepositoryContentConsumer consumer = (RepositoryContentConsumer) object;
-            if ( wantsFile( consumer, FilenameUtils.separatorsToUnix( basefile.getRelativePath()
) ) )
-            {
-                satisfies = true;
+            satisfies = true;
 
-                // regardless of the timestamp, we record that it was wanted so it doesn't
get counted as invalid
-                wantedFileCount++;
+            // regardless of the timestamp, we record that it was wanted so it doesn't get
counted as invalid
+            wantedFileCount++;
 
-                if ( !consumer.isProcessUnmodified() )
+            if ( !consumer.isProcessUnmodified( ) )
+            {
+                // Timestamp finished points to the last successful scan, not this current
one.
+                if ( basefile.lastModified( ) < changesSince )
                 {
-                    // Timestamp finished points to the last successful scan, not this current
one.
-                    if ( basefile.lastModified() < changesSince )
-                    {
-                        // Skip file as no change has occurred.
-                        satisfies = false;
-                    }
+                    // Skip file as no change has occurred.
+                    satisfies = false;
                 }
             }
         }
@@ -94,17 +91,17 @@ public class ConsumerWantsFilePredicate
         return satisfies;
     }
 
-    public BaseFile getBasefile()
+    public BaseFile getBasefile( )
     {
         return basefile;
     }
 
-    public int getWantedFileCount()
+    public int getWantedFileCount( )
     {
         return wantedFileCount;
     }
 
-    public boolean isCaseSensitive()
+    public boolean isCaseSensitive( )
     {
         return isCaseSensitive;
     }
@@ -123,7 +120,7 @@ public class ConsumerWantsFilePredicate
     private boolean wantsFile( RepositoryContentConsumer consumer, String relativePath )
     {
         // Test excludes first.
-        List<String> excludes = consumer.getExcludes();
+        List<String> excludes = consumer.getExcludes( );
         if ( excludes != null )
         {
             for ( String pattern : excludes )
@@ -139,18 +136,24 @@ public class ConsumerWantsFilePredicate
         if ( managedRepository != null )
         {
             String indexDirectory;
-            if (managedRepository.supportsFeature( IndexCreationFeature.class )) {
-                IndexCreationFeature icf = managedRepository.getFeature( IndexCreationFeature.class
).get();
-                if (icf.getIndexPath()==null) {
-                    indexDirectory=".index";
-                } else
+            if ( managedRepository.supportsFeature( IndexCreationFeature.class ) )
+            {
+                IndexCreationFeature icf = managedRepository.getFeature( IndexCreationFeature.class
).get( );
+                if ( icf.getIndexPath( ) == null )
+                {
+                    indexDirectory = ".index";
+                }
+                else
                 {
                     indexDirectory = ( icf.getIndexPath( ).getScheme( ) == null ? Paths.get(
icf.getIndexPath( ).getPath( ) ) : Paths.get( icf.getIndexPath( ) ) ).toString( );
                 }
-            } else {
+            }
+            else
+            {
                 indexDirectory = ".index";
             }
-            if (StringUtils.isEmpty( indexDirectory )) {
+            if ( StringUtils.isEmpty( indexDirectory ) )
+            {
                 indexDirectory = ".index";
             }
             if ( StringUtils.startsWith( relativePath, indexDirectory ) )
@@ -161,7 +164,7 @@ public class ConsumerWantsFilePredicate
         }
 
         // Now test includes.
-        for ( String pattern : consumer.getIncludes() )
+        for ( String pattern : consumer.getIncludes( ) )
         {
             if ( SelectorUtils.matchPath( pattern, relativePath, isCaseSensitive ) )
             {

http://git-wip-us.apache.org/repos/asf/archiva/blob/0f400d66/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/RepositoryContentConsumers.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/RepositoryContentConsumers.java
b/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/RepositoryContentConsumers.java
index b561c11..0cbc0aa 100644
--- a/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/RepositoryContentConsumers.java
+++ b/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/RepositoryContentConsumers.java
@@ -26,6 +26,7 @@ import org.apache.archiva.common.utils.PathUtil;
 import org.apache.archiva.configuration.ArchivaConfiguration;
 import org.apache.archiva.consumers.InvalidRepositoryContentConsumer;
 import org.apache.archiva.consumers.KnownRepositoryContentConsumer;
+import org.apache.archiva.consumers.RepositoryContentConsumer;
 import org.apache.archiva.consumers.functors.ConsumerWantsFilePredicate;
 import org.apache.archiva.redback.components.registry.RegistryListener;
 import org.apache.archiva.repository.ManagedRepository;
@@ -275,7 +276,7 @@ public class RepositoryContentConsumers
         // Run the repository consumers
         try
         {
-            Closure triggerBeginScan = new TriggerBeginScanClosure( repository, getStartTime(),
false );
+            Closure<RepositoryContentConsumer> triggerBeginScan = new TriggerBeginScanClosure(
repository, getStartTime(), false );
 
             selectedKnownConsumers = getSelectedKnownConsumers();
 
@@ -312,7 +313,7 @@ public class RepositoryContentConsumers
             closure.setBasefile( baseFile );
             closure.setExecuteOnEntireRepo( false );
 
-            Closure processIfWanted = IfClosure.ifClosure( predicate, closure );
+            Closure<RepositoryContentConsumer> processIfWanted = IfClosure.ifClosure(
predicate, closure );
 
             IterableUtils.forEach( selectedKnownConsumers, processIfWanted );
 

http://git-wip-us.apache.org/repos/asf/archiva/blob/0f400d66/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/functors/ConsumerProcessFileClosure.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/functors/ConsumerProcessFileClosure.java
b/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/functors/ConsumerProcessFileClosure.java
index 6cd9b21..6872874 100644
--- a/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/functors/ConsumerProcessFileClosure.java
+++ b/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/functors/ConsumerProcessFileClosure.java
@@ -28,62 +28,59 @@ import org.slf4j.LoggerFactory;
 import java.util.Map;
 
 /**
- * ConsumerProcessFileClosure 
- *
+ * ConsumerProcessFileClosure
  */
 public class ConsumerProcessFileClosure
-    implements Closure
+    implements Closure<RepositoryContentConsumer>
 {
     private Logger log = LoggerFactory.getLogger( ConsumerProcessFileClosure.class );
-    
+
     private BaseFile basefile;
 
     private boolean executeOnEntireRepo;
 
-    private Map<String,Long> consumerTimings;
-    
-    private Map<String,Long> consumerCounts;
+    private Map<String, Long> consumerTimings;
+
+    private Map<String, Long> consumerCounts;
 
     @Override
-    public void execute( Object input )
+    public void execute( RepositoryContentConsumer input )
     {
-        if ( input instanceof RepositoryContentConsumer )
+        RepositoryContentConsumer consumer = (RepositoryContentConsumer) input;
+
+        String id = consumer.getId( );
+        try
         {
-            RepositoryContentConsumer consumer = (RepositoryContentConsumer) input;
+            log.debug( "Sending to consumer: {}", id );
+
+            long startTime = System.currentTimeMillis( );
+            consumer.processFile( basefile.getRelativePath( ), executeOnEntireRepo );
+            long endTime = System.currentTimeMillis( );
 
-            String id = consumer.getId();
-            try
+            if ( consumerTimings != null )
             {
-                log.debug( "Sending to consumer: {}", id );
-
-                long startTime = System.currentTimeMillis();
-                consumer.processFile( basefile.getRelativePath(), executeOnEntireRepo );
-                long endTime = System.currentTimeMillis();
-
-                if ( consumerTimings != null )
-                {
-                    Long value = consumerTimings.get( id );
-                    consumerTimings.put( id, ( value != null ? value : 0 ) + endTime - startTime
);
-                }
-
-                if ( consumerCounts != null )
-                {
-                    Long value = consumerCounts.get( id );
-                    consumerCounts.put( id, ( value != null ? value : 0 ) + 1 );
-                }
+                Long value = consumerTimings.get( id );
+                consumerTimings.put( id, ( value != null ? value : 0 ) + endTime - startTime
);
             }
-            catch ( Exception e )
+
+            if ( consumerCounts != null )
             {
-                /* Intentionally Catch all exceptions.
-                 * So that the discoverer processing can continue.
-                 */
-                log.error( "Consumer [{}] had an error when processing file ["
-                    + "{}]: {}", id, basefile.getAbsolutePath(), e.getMessage(), e );
+                Long value = consumerCounts.get( id );
+                consumerCounts.put( id, ( value != null ? value : 0 ) + 1 );
             }
         }
+        catch ( Exception e )
+        {
+            /* Intentionally Catch all exceptions.
+             * So that the discoverer processing can continue.
+             */
+            log.error( "Consumer [{}] had an error when processing file ["
+                + "{}]: {}", id, basefile.getAbsolutePath( ), e.getMessage( ), e );
+        }
+
     }
 
-    public BaseFile getBasefile()
+    public BaseFile getBasefile( )
     {
         return basefile;
     }
@@ -93,7 +90,7 @@ public class ConsumerProcessFileClosure
         this.basefile = basefile;
     }
 
-    public boolean isExecuteOnEntireRepo()
+    public boolean isExecuteOnEntireRepo( )
     {
         return executeOnEntireRepo;
     }
@@ -113,7 +110,7 @@ public class ConsumerProcessFileClosure
         this.consumerCounts = consumerCounts;
     }
 
-    public Logger getLogger()
+    public Logger getLogger( )
     {
         return log;
     }

http://git-wip-us.apache.org/repos/asf/archiva/blob/0f400d66/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/functors/TriggerBeginScanClosure.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/functors/TriggerBeginScanClosure.java
b/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/functors/TriggerBeginScanClosure.java
index 8bd6d8e..209f29c 100644
--- a/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/functors/TriggerBeginScanClosure.java
+++ b/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/functors/TriggerBeginScanClosure.java
@@ -29,17 +29,15 @@ import org.slf4j.LoggerFactory;
 import java.util.Date;
 
 /**
- * TriggerBeginScanClosure 
- *
- *
+ * TriggerBeginScanClosure
  */
 public class TriggerBeginScanClosure
-    implements Closure
+    implements Closure<RepositoryContentConsumer>
 {
     private Logger log = LoggerFactory.getLogger( TriggerBeginScanClosure.class );
-    
+
     private ManagedRepository repository;
-    
+
     private Date whenGathered;
 
     private boolean executeOnEntireRepo = true;
@@ -48,7 +46,7 @@ public class TriggerBeginScanClosure
     {
         this.repository = repository;
     }
-    
+
     public TriggerBeginScanClosure( ManagedRepository repository, Date whenGathered )
     {
         this( repository );
@@ -62,20 +60,17 @@ public class TriggerBeginScanClosure
     }
 
     @Override
-    public void execute( Object input )
+    public void execute( RepositoryContentConsumer input )
     {
-        if ( input instanceof RepositoryContentConsumer )
+        RepositoryContentConsumer consumer = (RepositoryContentConsumer) input;
+
+        try
+        {
+            consumer.beginScan( repository, whenGathered, executeOnEntireRepo );
+        }
+        catch ( ConsumerException e )
         {
-            RepositoryContentConsumer consumer = (RepositoryContentConsumer) input;
-                
-            try
-            {
-                consumer.beginScan( repository, whenGathered, executeOnEntireRepo );
-            }
-            catch ( ConsumerException e )
-            {
-                log.warn( "Consumer [{}] cannot begin: {}",consumer.getId(), e.getMessage(),
e );
-            }
+            log.warn( "Consumer [{}] cannot begin: {}", consumer.getId( ), e.getMessage(
), e );
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/archiva/blob/0f400d66/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/functors/TriggerScanCompletedClosure.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/functors/TriggerScanCompletedClosure.java
b/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/functors/TriggerScanCompletedClosure.java
index 79909f8..4a52ea8 100644
--- a/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/functors/TriggerScanCompletedClosure.java
+++ b/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/functors/TriggerScanCompletedClosure.java
@@ -29,7 +29,7 @@ import org.slf4j.LoggerFactory;
  * TriggerScanCompletedClosure
  */
 public class TriggerScanCompletedClosure
-    implements Closure
+    implements Closure<RepositoryContentConsumer>
 {
     private Logger log = LoggerFactory.getLogger( TriggerScanCompletedClosure.class );
 
@@ -49,13 +49,10 @@ public class TriggerScanCompletedClosure
     }
 
     @Override
-    public void execute( Object input )
+    public void execute( RepositoryContentConsumer input )
     {
-        if ( input instanceof RepositoryContentConsumer )
-        {
-            RepositoryContentConsumer consumer = (RepositoryContentConsumer) input;
-            consumer.completeScan( executeOnEntireRepo );
-            log.debug( "Consumer [{}] completed for repository [{}]", consumer.getId(), repository.getId()
);
-        }
+        RepositoryContentConsumer consumer = (RepositoryContentConsumer) input;
+        consumer.completeScan( executeOnEntireRepo );
+        log.debug( "Consumer [{}] completed for repository [{}]", consumer.getId( ), repository.getId(
) );
     }
 }

http://git-wip-us.apache.org/repos/asf/archiva/blob/0f400d66/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/IndexingArchivaTaskScheduler.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/IndexingArchivaTaskScheduler.java
b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/IndexingArchivaTaskScheduler.java
index 3d65810..14cbfe3 100644
--- a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/IndexingArchivaTaskScheduler.java
+++ b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/IndexingArchivaTaskScheduler.java
@@ -45,7 +45,7 @@ public class IndexingArchivaTaskScheduler
      */
     @Inject
     @Named(value = "taskQueue#indexing")
-    private TaskQueue indexingQueue;
+    private TaskQueue<ArtifactIndexingTask> indexingQueue;
 
     @Override
     public void queueTask( ArtifactIndexingTask task )

http://git-wip-us.apache.org/repos/asf/archiva/blob/0f400d66/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/repository/maven2/MavenManagedRepository.java
----------------------------------------------------------------------
diff --git a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/repository/maven2/MavenManagedRepository.java
b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/repository/maven2/MavenManagedRepository.java
index 7b9279f..ea55b7c 100644
--- a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/repository/maven2/MavenManagedRepository.java
+++ b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/repository/maven2/MavenManagedRepository.java
@@ -38,6 +38,7 @@ import java.net.URI;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.util.Locale;
+import java.util.function.Function;
 
 /**
  * Maven2 managed repository implementation.
@@ -85,6 +86,8 @@ public class MavenManagedRepository extends AbstractManagedRepository
         return CAPABILITIES;
     }
 
+
+    @SuppressWarnings( "unchecked" )
     @Override
     public <T extends RepositoryFeature<T>> RepositoryFeature<T> getFeature(
Class<T> clazz ) throws UnsupportedFeatureException
     {

http://git-wip-us.apache.org/repos/asf/archiva/blob/0f400d66/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/repository/maven2/MavenRepositoryProvider.java
----------------------------------------------------------------------
diff --git a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/repository/maven2/MavenRepositoryProvider.java
b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/repository/maven2/MavenRepositoryProvider.java
index 62057b0..79a9fb9 100644
--- a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/repository/maven2/MavenRepositoryProvider.java
+++ b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/repository/maven2/MavenRepositoryProvider.java
@@ -57,7 +57,9 @@ import java.time.Duration;
 import java.time.Period;
 import java.time.temporal.ChronoUnit;
 import java.util.HashSet;
+import java.util.Map;
 import java.util.Set;
+import java.util.stream.Collectors;
 
 /**
  * Provider for the maven2 repository implementations
@@ -242,8 +244,12 @@ public class MavenRepositoryProvider implements RepositoryProvider {
                 remoteIndexFeature.setDownloadRemoteIndexOnStartup(false);
             }
         }
-        repo.setExtraHeaders(cfg.getExtraHeaders());
-        repo.setExtraParameters(cfg.getExtraParameters());
+        for ( Object key : cfg.getExtraHeaders().keySet() ) {
+            repo.addExtraHeader( key.toString(), cfg.getExtraHeaders().get(key).toString()
);
+        }
+        for ( Object key : cfg.getExtraParameters().keySet() ) {
+            repo.addExtraParameter( key.toString(), cfg.getExtraParameters().get(key).toString()
);
+        }
         PasswordCredentials credentials = new PasswordCredentials("", new char[0]);
         if (cfg.getPassword() != null && cfg.getUsername() != null) {
             credentials.setPassword(cfg.getPassword().toCharArray());

http://git-wip-us.apache.org/repos/asf/archiva/blob/0f400d66/archiva-modules/plugins/metadata-store-jcr/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/plugins/metadata-store-jcr/pom.xml b/archiva-modules/plugins/metadata-store-jcr/pom.xml
index 6090113..299a29a 100644
--- a/archiva-modules/plugins/metadata-store-jcr/pom.xml
+++ b/archiva-modules/plugins/metadata-store-jcr/pom.xml
@@ -87,6 +87,11 @@
       </exclusions>
     </dependency>
     <dependency>
+      <groupId>org.apache.felix</groupId>
+      <artifactId>org.apache.felix.scr.annotations</artifactId>
+      <version>RELEASE</version>
+    </dependency>
+    <dependency>
       <groupId>org.apache.logging.log4j</groupId>
       <artifactId>log4j-core</artifactId>
     </dependency>

http://git-wip-us.apache.org/repos/asf/archiva/blob/0f400d66/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrMetadataRepository.java
----------------------------------------------------------------------
diff --git a/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrMetadataRepository.java
b/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrMetadataRepository.java
index 978602a..1231a14 100644
--- a/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrMetadataRepository.java
+++ b/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrMetadataRepository.java
@@ -1386,6 +1386,7 @@ public class JcrMetadataRepository
         return aClass == Session.class;
     }
 
+    @SuppressWarnings( "unchecked" )
     @Override
     public <T> T obtainAccess( Class<T> aClass )
         throws MetadataRepositoryException


Mime
View raw message