Skip to content

Commit c48a666

Browse files
committed
OAK-11403: Remove usage of Guava io.ByteSource
1 parent c0c1146 commit c48a666

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

oak-blob-plugins/src/test/java/org/apache/jackrabbit/oak/plugins/blob/CompositeDataStoreCacheTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
package org.apache.jackrabbit.oak.plugins.blob;
2020

2121
import java.io.File;
22+
import java.io.FileInputStream;
2223
import java.io.IOException;
2324
import java.io.InputStream;
2425
import java.util.concurrent.CountDownLatch;
@@ -570,7 +571,7 @@ public void concurrentAddGet() throws Exception {
570571
// Get a handle to the file and open stream
571572
File fileOnUpload = cache.getIfPresent(ID_PREFIX + 0);
572573
assertNotNull(fileOnUpload);
573-
final InputStream fStream = Files.asByteSource(fileOnUpload).openStream();
574+
final InputStream fStream = new FileInputStream(fileOnUpload);
574575

575576
thread1Start.countDown();
576577

oak-blob-plugins/src/test/java/org/apache/jackrabbit/oak/plugins/blob/UploadStagingCacheTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
import java.io.BufferedWriter;
2222
import java.io.File;
23+
import java.io.FileInputStream;
2324
import java.io.FileWriter;
2425
import java.io.IOException;
2526
import java.io.InputStream;
@@ -502,7 +503,7 @@ public void testConcurrentGetDelete() throws Exception {
502503

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

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

0 commit comments

Comments
 (0)