aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/plugins/metadata-store-jcr
diff options
context:
space:
mode:
authorMartin Stockhammer <martin_s@apache.org>2019-08-25 13:50:55 +0200
committerMartin Stockhammer <martin_s@apache.org>2019-08-25 13:50:55 +0200
commit811c445f04c90293b4ff30fbbc8f36a5e174d2e7 (patch)
treeed6792ec3b72d22f143b430998bd9b5ba4b26d6a /archiva-modules/plugins/metadata-store-jcr
parent232ac43077037ad349ae62e9c254dcc18378b1d3 (diff)
downloadarchiva-811c445f04c90293b4ff30fbbc8f36a5e174d2e7.tar.gz
archiva-811c445f04c90293b4ff30fbbc8f36a5e174d2e7.zip
Changing contract for nullable parameters
Diffstat (limited to 'archiva-modules/plugins/metadata-store-jcr')
-rw-r--r--archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrMetadataRepository.java2
-rw-r--r--archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/OakRepositoryFactory.java7
2 files changed, 4 insertions, 5 deletions
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 a9d0a85eb..07ef40c29 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
@@ -41,6 +41,7 @@ import org.apache.jackrabbit.commons.cnd.ParseException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import javax.annotation.ParametersAreNonnullByDefault;
import javax.jcr.NamespaceRegistry;
import javax.jcr.Node;
import javax.jcr.NodeIterator;
@@ -76,6 +77,7 @@ import static org.apache.archiva.metadata.repository.jcr.JcrConstants.*;
* TODO below: revise storage format for project version metadata
* TODO revise reference storage
*/
+@ParametersAreNonnullByDefault
public class JcrMetadataRepository
extends AbstractMetadataRepository implements MetadataRepository, RepositoryStatisticsProvider
{
diff --git a/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/OakRepositoryFactory.java b/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/OakRepositoryFactory.java
index d30304860..1db4fd1e7 100644
--- a/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/OakRepositoryFactory.java
+++ b/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/OakRepositoryFactory.java
@@ -75,7 +75,6 @@ import org.jetbrains.annotations.NotNull;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import javax.annotation.Nonnull;
import javax.jcr.Repository;
import java.io.Closeable;
import java.io.IOException;
@@ -90,14 +89,12 @@ import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import static com.google.common.base.Preconditions.checkNotNull;
+import static org.apache.archiva.metadata.repository.jcr.JcrConstants.*;
import static org.apache.archiva.metadata.repository.jcr.OakRepositoryFactory.StoreType.IN_MEMORY_TYPE;
import static org.apache.archiva.metadata.repository.jcr.OakRepositoryFactory.StoreType.SEGMENT_FILE_TYPE;
import static org.apache.commons.io.FileUtils.ONE_MB;
import static org.apache.jackrabbit.JcrConstants.*;
import static org.apache.jackrabbit.oak.api.Type.NAME;
-import static org.apache.archiva.metadata.repository.jcr.JcrConstants.*;
-import static org.apache.jackrabbit.oak.spi.whiteboard.WhiteboardUtils.registerMBean;
-import static org.apache.jackrabbit.oak.spi.whiteboard.WhiteboardUtils.scheduleWithFixedDelay;
/**
* Created by martin on 14.06.17.
@@ -430,7 +427,7 @@ public class OakRepositoryFactory
}
@Override
- public void initialize( @Nonnull NodeBuilder root )
+ public void initialize( NodeBuilder root )
{
NodeBuilder namespaces;
if ( !root.hasChildNode( NamespaceConstants.REP_NAMESPACES ) )