Skip to content
This repository was archived by the owner on Oct 6, 2023. It is now read-only.

Commit e4eae6f

Browse files
author
sowerstl
committed
Reduce false positive Subversion validations; (DOECODE-511)
1 parent 163be8d commit e4eae6f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/main/java/gov/osti/repository/SubversionRepository.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
*/
33
package gov.osti.repository;
44

5-
import java.util.Collection;
5+
import java.util.Date;
66
import org.slf4j.Logger;
77
import org.slf4j.LoggerFactory;
88
import org.tmatesoft.svn.core.SVNURL;
@@ -24,15 +24,15 @@ public class SubversionRepository {
2424
*/
2525
public static boolean isValid(String url) {
2626
SVNRepository repository = null;
27-
27+
2828
try {
2929
SVNURL repoUrl = SVNURL.parseURIEncoded(url);
3030
repository = SVNRepositoryFactory.create(repoUrl);
31-
32-
Collection logs = repository.log(new String[] { "" }, null, -1, -1, true, true);
33-
34-
// if we have some sort of log entry (even initial import), we are valid
35-
return !logs.isEmpty();
31+
32+
long rev = repository.getDatedRevision(new Date());
33+
34+
// if we passed the dated revision check, we are valid
35+
return true;
3636
} catch ( Exception e ) {
3737
log.warn("SVN Error for " + url + ": " + e.getMessage());
3838
return false;

0 commit comments

Comments
 (0)