]> source.dussan.org Git - archiva.git/commitdiff
removed set method for start time
authorMaria Odea B. Ching <oching@apache.org>
Fri, 27 Jun 2008 08:03:35 +0000 (08:03 +0000)
committerMaria Odea B. Ching <oching@apache.org>
Fri, 27 Jun 2008 08:03:35 +0000 (08:03 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@672184 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/scanner/RepositoryContentConsumers.java
archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/scanner/RepositoryContentConsumersStub.java
archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/scanner/RepositoryContentConsumersTest.java

index bafc9ab66f7140ce9a6fcf414c7a17a2fb4db805..c952475ba7edba06ad1a510e7c1a2687986fbaa7 100644 (file)
@@ -72,8 +72,6 @@ public class RepositoryContentConsumers
 
     private List<InvalidRepositoryContentConsumer> selectedInvalidConsumers;
     
-    private Date startTime;
-
     /**
      * <p>
      * Get the list of Ids associated with those {@link KnownRepositoryContentConsumer} that have
@@ -309,17 +307,10 @@ public class RepositoryContentConsumers
     {
         this.selectedInvalidConsumers = selectedInvalidConsumers;
     }
-        
-    public void setStartTime( Date startTime )
-    {
-        this.startTime = startTime;
-    }
     
-    public Date getStartTime()
-    {        
-        startTime = new Date( System.currentTimeMillis() );
-        
-        return startTime;
+    protected Date getStartTime()
+    {   
+        return new Date( System.currentTimeMillis() );
     }
     
     public void setArchivaConfiguration( ArchivaConfiguration archivaConfiguration )
index 6cd952e744accadec9c95c64cc8ec933bf037168..8d3780c2612f740228e371452681076b8ca07861 100644 (file)
@@ -4,16 +4,12 @@ import java.util.Date;
 
 public class RepositoryContentConsumersStub
     extends RepositoryContentConsumers
-{
-    private Date startTimeForTest;
-    
-    public void setStartTime( Date startTimeForTest )
-    {
-        this.startTimeForTest = startTimeForTest;
-    }
-    
+{       
     public Date getStartTime()
     {
+        Date startTimeForTest = new Date( System.currentTimeMillis() );
+        startTimeForTest.setTime( 12345678 );
+        
         return startTimeForTest;
     }
 }
index cf7d7726f169cbaffa6c8c13b634e22da91f464e..b2bfa7215696b17e6cdb36665fb066f0e8d63fd3 100644 (file)
@@ -223,6 +223,7 @@ public class RepositoryContentConsumersTest
         File testFile = getTestFile( "target/test-repo/path/to/test-file.txt" );
 
         Date startTime = new Date( System.currentTimeMillis() );
+        startTime.setTime( 12345678 );
         
         selectedKnownConsumer.beginScan( repo, startTime );
         selectedKnownConsumer.getExcludes();
@@ -236,8 +237,7 @@ public class RepositoryContentConsumersTest
         selectedInvalidConsumer.beginScan( repo, startTime );
         //        invalidConsumer.completeScan();
         invalidControl.replay();
-
-        consumers.setStartTime( startTime );
+        
         consumers.executeConsumers( repo, testFile );
 
         knownControl.verify();