@Test public void doNotCheckAvailabilityOfInputStreamIfContentLengthIsZero() throws IOException { mockAssetBrowse(); InputStream stream = mock(InputStream.class); commonBlobMock(1, stream, new BlobMetrics(DateTime.now(), "1234", 0)); List<DeadBlobResult<Asset>> result = deadBlobFinder.find(repository); assertThat(result, empty()); verify(stream, never()).available(); }
@Override public List<DeadBlobResult<Asset>> find(@NotNull final Repository repository, final boolean ignoreMissingBlobRefs) { checkNotNull(repository); List<DeadBlobResult<Asset>> deadBlobCandidates = identifySuspects(repository, ignoreMissingBlobRefs); return verifySuspects(deadBlobCandidates, repository); }
DatastoreDeadBlobFinder extends ComponentSupport implements DeadBlobFinder<Asset> { @Override public List<DeadBlobResult<Asset>> find(@NotNull final Repository repository, final boolean ignoreMissingBlobRefs) { checkNotNull(repository); List<DeadBlobResult<Asset>> deadBlobCandidates = identifySuspects(repository, ignoreMissingBlobRefs); return verifySuspects(deadBlobCandidates, repository); } }
DatastoreDeadBlobFinder extends ComponentSupport implements DeadBlobFinder<Asset> { @Override public List<DeadBlobResult<Asset>> find(@NotNull final Repository repository, final boolean ignoreMissingBlobRefs) { checkNotNull(repository); List<DeadBlobResult<Asset>> deadBlobCandidates = identifySuspects(repository, ignoreMissingBlobRefs); return verifySuspects(deadBlobCandidates, repository); } @Inject  DatastoreDeadBlobFinder(final BlobStoreManager blobStoreManager); }
DatastoreDeadBlobFinder extends ComponentSupport implements DeadBlobFinder<Asset> { @Override public List<DeadBlobResult<Asset>> find(@NotNull final Repository repository, final boolean ignoreMissingBlobRefs) { checkNotNull(repository); List<DeadBlobResult<Asset>> deadBlobCandidates = identifySuspects(repository, ignoreMissingBlobRefs); return verifySuspects(deadBlobCandidates, repository); } @Inject  DatastoreDeadBlobFinder(final BlobStoreManager blobStoreManager); @Override List<DeadBlobResult<Asset>> find(@NotNull final Repository repository, final boolean ignoreMissingBlobRefs); }
DatastoreDeadBlobFinder extends ComponentSupport implements DeadBlobFinder<Asset> { @Override public List<DeadBlobResult<Asset>> find(@NotNull final Repository repository, final boolean ignoreMissingBlobRefs) { checkNotNull(repository); List<DeadBlobResult<Asset>> deadBlobCandidates = identifySuspects(repository, ignoreMissingBlobRefs); return verifySuspects(deadBlobCandidates, repository); } @Inject  DatastoreDeadBlobFinder(final BlobStoreManager blobStoreManager); @Override List<DeadBlobResult<Asset>> find(@NotNull final Repository repository, final boolean ignoreMissingBlobRefs);  }