Skip to content

Commit

Permalink
OAK-11403: Remove usage of Guava io.ByteSource
Browse files Browse the repository at this point in the history
  • Loading branch information
reschke committed Jan 17, 2025
1 parent c0c1146 commit c48a666
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
package org.apache.jackrabbit.oak.plugins.blob;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.concurrent.CountDownLatch;
Expand Down Expand Up @@ -570,7 +571,7 @@ public void concurrentAddGet() throws Exception {
// Get a handle to the file and open stream
File fileOnUpload = cache.getIfPresent(ID_PREFIX + 0);
assertNotNull(fileOnUpload);
final InputStream fStream = Files.asByteSource(fileOnUpload).openStream();
final InputStream fStream = new FileInputStream(fileOnUpload);

thread1Start.countDown();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
Expand Down Expand Up @@ -502,7 +503,7 @@ public void testConcurrentGetDelete() throws Exception {

// Get a handle to the file and open stream
File file = stagingCache.getIfPresent(ID_PREFIX + 0);
final InputStream fStream = Files.asByteSource(file).openStream();
final InputStream fStream = new FileInputStream(file);

// task to copy the steam to a file simulating read from the stream
File temp = folder.newFile();
Expand Down

0 comments on commit c48a666

Please sign in to comment.