]> source.dussan.org Git - archiva.git/commitdiff
Tidy up method order
authorJames William Dumay <jdumay@apache.org>
Thu, 26 Feb 2009 04:07:55 +0000 (04:07 +0000)
committerJames William Dumay <jdumay@apache.org>
Thu, 26 Feb 2009 04:07:55 +0000 (04:07 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/archiva-with-new-repoapi@748000 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-base/archiva-repository/src/main/java/org/apache/archiva/repository/GroupRepositoryManager.java

index dcbde68191906bffc6100e84457c2874ddc48717..810de270e46001640e581ef8fb2251a67653133b 100644 (file)
@@ -21,14 +21,10 @@ package org.apache.archiva.repository;
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
-import java.io.CharArrayWriter;
-import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.io.OutputStreamWriter;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
 import java.util.ArrayList;
 import java.util.LinkedHashMap;
 import java.util.List;
@@ -45,7 +41,6 @@ import org.apache.commons.codec.digest.DigestUtils;
 import org.apache.maven.archiva.configuration.ArchivaConfiguration;
 import org.apache.maven.archiva.configuration.RepositoryGroupConfiguration;
 import org.apache.maven.archiva.model.ArchivaRepositoryMetadata;
-import org.apache.maven.archiva.model.VersionedReference;
 import org.apache.maven.archiva.repository.content.RepositoryRequest;
 import org.apache.maven.archiva.repository.metadata.MetadataTools;
 import org.apache.maven.archiva.repository.metadata.RepositoryMetadataException;
@@ -96,16 +91,6 @@ public class GroupRepositoryManager implements RepositoryManager
         return null;
     }
 
-    private MutableResourceContext getMetadataLogicalPathWithoutChecksum(ResourceContext resourceContext)
-    {
-        MutableResourceContext context = new MutableResourceContext(resourceContext);
-        if (context.getLogicalPath().endsWith(".md5") || context.getLogicalPath().endsWith(".sha1"))
-        {
-            context.setLogicalPath(context.getLogicalPath().substring(0, context.getLogicalPath().lastIndexOf('.')));
-        }
-        return context;
-    }
-
     public boolean read(ResourceContext context, OutputStream os)
     {
         final RepositoryGroupConfiguration groupConfiguration = getGroupConfiguration(context.getRepositoryId());
@@ -232,6 +217,16 @@ public class GroupRepositoryManager implements RepositoryManager
         }
     }
 
+    private MutableResourceContext getMetadataLogicalPathWithoutChecksum(ResourceContext resourceContext)
+    {
+        MutableResourceContext context = new MutableResourceContext(resourceContext);
+        if (context.getLogicalPath().endsWith(".md5") || context.getLogicalPath().endsWith(".sha1"))
+        {
+            context.setLogicalPath(context.getLogicalPath().substring(0, context.getLogicalPath().lastIndexOf('.')));
+        }
+        return context;
+    }
+
     private boolean readFromGroup(final RepositoryGroupConfiguration groupConfiguration, ResourceContext context, OutputStream os)
     {
         for (final String repositoryId : groupConfiguration.getRepositories())