archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From och...@apache.org
Subject svn commit: r672184 - in /archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src: main/java/org/apache/maven/archiva/repository/scanner/ test/java/org/apache/maven/archiva/repository/scanner/
Date Fri, 27 Jun 2008 08:03:36 GMT
Author: oching
Date: Fri Jun 27 01:03:35 2008
New Revision: 672184

URL: http://svn.apache.org/viewvc?rev=672184&view=rev
Log:
removed set method for start time

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

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/scanner/RepositoryContentConsumers.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/scanner/RepositoryContentConsumers.java?rev=672184&r1=672183&r2=672184&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/scanner/RepositoryContentConsumers.java
(original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/scanner/RepositoryContentConsumers.java
Fri Jun 27 01:03:35 2008
@@ -72,8 +72,6 @@
 
     private List<InvalidRepositoryContentConsumer> selectedInvalidConsumers;
     
-    private Date startTime;
-
     /**
      * <p>
      * Get the list of Ids associated with those {@link KnownRepositoryContentConsumer} that
have
@@ -309,17 +307,10 @@
     {
         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 )

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/scanner/RepositoryContentConsumersStub.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/scanner/RepositoryContentConsumersStub.java?rev=672184&r1=672183&r2=672184&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/scanner/RepositoryContentConsumersStub.java
(original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/scanner/RepositoryContentConsumersStub.java
Fri Jun 27 01:03:35 2008
@@ -4,16 +4,12 @@
 
 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;
     }
 }

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/scanner/RepositoryContentConsumersTest.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/scanner/RepositoryContentConsumersTest.java?rev=672184&r1=672183&r2=672184&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/scanner/RepositoryContentConsumersTest.java
(original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/scanner/RepositoryContentConsumersTest.java
Fri Jun 27 01:03:35 2008
@@ -223,6 +223,7 @@
         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 @@
         selectedInvalidConsumer.beginScan( repo, startTime );
         //        invalidConsumer.completeScan();
         invalidControl.replay();
-
-        consumers.setStartTime( startTime );
+        
         consumers.executeConsumers( repo, testFile );
 
         knownControl.verify();



Mime
View raw message