privatising methods

git-svn-id: https://svn.apache.org/repos/asf/maven/repository-manager/trunk@360159 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Porter 2005-12-30 20:11:56 +00:00
parent 9660671639
commit d0b9a9aed6
10 changed files with 47 additions and 43 deletions

View File

@ -33,11 +33,11 @@ public abstract class AbstractRepositoryIndex
extends AbstractLogEnabled
implements RepositoryIndex
{
protected String indexPath;
private String indexPath;
protected boolean indexOpen;
private boolean indexOpen;
protected IndexReader indexReader;
private IndexReader indexReader;
protected IndexWriter indexWriter;
@ -131,7 +131,7 @@ public abstract class AbstractRepositoryIndex
}
}
protected void getIndexReader()
private void getIndexReader()
throws IOException
{
if ( indexReader == null )
@ -145,7 +145,7 @@ public abstract class AbstractRepositoryIndex
*
* @throws RepositoryIndexException if the given indexPath is not valid for this type of RepositoryIndex
*/
protected void validateIndex()
private void validateIndex()
throws RepositoryIndexException, IOException
{
File indexDir = new File( indexPath );

View File

@ -50,13 +50,13 @@ public class ArtifactRepositoryIndexingTest
private static final String FILES = "files";
protected ArtifactRepositoryIndex indexer;
private ArtifactRepositoryIndex indexer;
protected ArtifactFactory artifactFactory;
private ArtifactFactory artifactFactory;
protected ArtifactRepository repository;
private ArtifactRepository repository;
protected String indexPath;
private String indexPath;
protected void setUp()
throws Exception
@ -213,7 +213,7 @@ public class ArtifactRepositoryIndexingTest
assertEquals( 2, artifacts.size() );
}
protected Artifact getArtifact( String groupId, String artifactId, String version )
private Artifact getArtifact( String groupId, String artifactId, String version )
throws Exception
{
if ( artifactFactory == null )

View File

@ -43,10 +43,14 @@ import java.util.Map;
public class BadMetadataReportProcessor
implements MetadataReportProcessor
{
/** @plexus.requirement */
/**
* @plexus.requirement
*/
private ArtifactFactory artifactFactory;
/** @plexus.requirement */
/**
* @plexus.requirement
*/
private RepositoryQueryLayerFactory repositoryQueryLayerFactory;
/**
@ -120,8 +124,8 @@ public class BadMetadataReportProcessor
* @param repository the repository where the metadata was encountered
* @param reporter the ArtifactReporter to receive processing results
*/
protected boolean checkPluginMetadata( RepositoryMetadata metadata, ArtifactRepository repository,
ArtifactReporter reporter )
private boolean checkPluginMetadata( RepositoryMetadata metadata, ArtifactRepository repository,
ArtifactReporter reporter )
throws IOException
{
boolean hasFailures = false;
@ -197,8 +201,8 @@ public class BadMetadataReportProcessor
* @param repository the repository where the metadata was encountered
* @param reporter the ArtifactReporter to receive processing results
*/
protected boolean checkSnapshotMetadata( RepositoryMetadata metadata, ArtifactRepository repository,
ArtifactReporter reporter )
private boolean checkSnapshotMetadata( RepositoryMetadata metadata, ArtifactRepository repository,
ArtifactReporter reporter )
{
RepositoryQueryLayer repositoryQueryLayer =
repositoryQueryLayerFactory.createRepositoryQueryLayer( repository );
@ -226,8 +230,8 @@ public class BadMetadataReportProcessor
* @param repository the repository where the metadata was encountered
* @param reporter the ArtifactReporter to receive processing results
*/
protected boolean checkMetadataVersions( RepositoryMetadata metadata, ArtifactRepository repository,
ArtifactReporter reporter )
private boolean checkMetadataVersions( RepositoryMetadata metadata, ArtifactRepository repository,
ArtifactReporter reporter )
{
RepositoryQueryLayer repositoryQueryLayer =
repositoryQueryLayerFactory.createRepositoryQueryLayer( repository );
@ -258,8 +262,8 @@ public class BadMetadataReportProcessor
* @param repository the repository where the metadata was encountered
* @param reporter the ArtifactReporter to receive processing results
*/
protected boolean checkRepositoryVersions( RepositoryMetadata metadata, ArtifactRepository repository,
ArtifactReporter reporter )
private boolean checkRepositoryVersions( RepositoryMetadata metadata, ArtifactRepository repository,
ArtifactReporter reporter )
throws IOException
{
boolean hasFailures = false;

View File

@ -41,9 +41,9 @@ import java.security.NoSuchAlgorithmException;
public class ChecksumArtifactReporter
implements ArtifactReportProcessor
{
protected InputStream md5InputStream;
private InputStream md5InputStream;
protected InputStream sha1InputStream;
private InputStream sha1InputStream;
private boolean isLocal = true;
@ -260,7 +260,7 @@ public class ChecksumArtifactReporter
* @param fileUrl The file to be validated.
* @param algo The checksum algorithm used.
*/
protected boolean validateChecksum( String fileUrl, String algo )
private boolean validateChecksum( String fileUrl, String algo )
{
boolean valid = false;

View File

@ -61,7 +61,7 @@ public class DefaultArtifactReportProcessor
}
}
protected void processArtifact( Artifact artifact, ArtifactReporter reporter )
private void processArtifact( Artifact artifact, ArtifactReporter reporter )
{
boolean hasFailed = false;
if ( EMPTY_STRING.equals( artifact.getGroupId() ) || artifact.getGroupId() == null )
@ -92,7 +92,7 @@ public class DefaultArtifactReportProcessor
}
}
protected void processDependencies( List dependencies, ArtifactReporter reporter )
private void processDependencies( List dependencies, ArtifactReporter reporter )
{
if ( dependencies.size() > 0 )
{

View File

@ -42,11 +42,11 @@ import java.util.jar.JarOutputStream;
public abstract class AbstractChecksumArtifactReporterTestCase
extends AbstractRepositoryReportsTestCase
{
protected static final String[] validArtifactChecksumJars = {"validArtifact-1.0"};
private static final String[] validArtifactChecksumJars = {"validArtifact-1.0"};
protected static final String[] invalidArtifactChecksumJars = {"invalidArtifact-1.0"};
private static final String[] invalidArtifactChecksumJars = {"invalidArtifact-1.0"};
protected static final String metadataChecksumFilename = "maven-metadata-repository";
private static final String metadataChecksumFilename = "maven-metadata-repository";
private static final int CHECKSUM_BUFFER_SIZE = 256;

View File

@ -33,7 +33,7 @@ import java.util.List;
public abstract class AbstractRepositoryQueryLayerTest
extends PlexusTestCase
{
protected ArtifactFactory artifactFactory;
private ArtifactFactory artifactFactory;
protected ArtifactRepository repository;
@ -126,7 +126,7 @@ public abstract class AbstractRepositoryQueryLayerTest
}
}
protected Artifact getArtifact( String groupId, String artifactId, String version )
private Artifact getArtifact( String groupId, String artifactId, String version )
{
return artifactFactory.createBuildArtifact( groupId, artifactId, version, "pom" );
}

View File

@ -32,13 +32,13 @@ public class ArtifactReportProcessorTest
private static final String VALID = "temp";
protected MockArtifactReporter reporter;
private MockArtifactReporter reporter;
protected Artifact artifact;
private Artifact artifact;
protected Model model;
private Model model;
protected DefaultArtifactReportProcessor processor;
private DefaultArtifactReportProcessor processor;
protected void setUp()
throws Exception
@ -443,14 +443,14 @@ public class ArtifactReportProcessorTest
super.tearDown();
}
protected void setRequiredElements( Artifact artifact, String groupId, String artifactId, String version )
private void setRequiredElements( Artifact artifact, String groupId, String artifactId, String version )
{
artifact.setGroupId( groupId );
artifact.setArtifactId( artifactId );
artifact.setVersion( version );
}
protected void setRequiredElements( Dependency dependency, String groupId, String artifactId, String version )
private void setRequiredElements( Dependency dependency, String groupId, String artifactId, String version )
{
dependency.setGroupId( groupId );
dependency.setArtifactId( artifactId );

View File

@ -29,17 +29,17 @@ import java.util.Iterator;
public class ArtifactReporterTest
extends AbstractRepositoryReportsTestCase
{
protected ArtifactReporter reporter;
private ArtifactReporter reporter;
protected ArtifactFactory artifactFactory;
private ArtifactFactory artifactFactory;
protected Artifact artifact;
private Artifact artifact;
protected MockArtifactReportProcessor processor;
private MockArtifactReportProcessor processor;
protected Versioning versioning;
private Versioning versioning;
protected Model model;
private Model model;
protected void setUp()
throws Exception

View File

@ -34,7 +34,7 @@ import java.util.Iterator;
public class BadMetadataReportProcessorTest
extends AbstractRepositoryReportsTestCase
{
protected ArtifactFactory artifactFactory;
private ArtifactFactory artifactFactory;
private MetadataReportProcessor badMetadataReportProcessor;