The following document contains the results of PMD's CPD 3.7.
File | Line |
---|---|
net/sf/vcaperture/services/YamlFilesystemStorageService.java | 113 |
net/sf/vcaperture/services/LuceneSearchService.java | 137 |
public String getLastProcessedRevision(AbstractRepository repo) { File file = new File(getRepoStorageDirectory(repo), LATEST_VERSION_FILE); if (file.exists() && file.isFile()) { try { String rev = FileUtils.readFileToString(file); return rev == null ? repo.getNullRevisionDefault() : rev.trim(); } catch (IOException ioe) { throw new StorageException("Error in storage mechanism: " + ioe.getMessage(), ioe); } } return repo.getNullRevisionDefault(); } public void updateLatestStoredRevision(AbstractRepository repo, Revision rev) { File file = new File(getRepoStorageDirectory(repo), LATEST_VERSION_FILE); try { FileUtils.writeStringToFile(file, rev.getName()); } catch (IOException ioe) { throw new StorageException("Error in storage mechanism: " + ioe.getMessage(), ioe); } } // IoC public File getStorageDirectory() { |