This is an automated email from the ASF dual-hosted git repository.
reschke pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git
The following commit(s) were added to refs/heads/trunk by this push:
new 2527702a51 OAK-10164: oak-commons: prepare for switch to shaded guava
2527702a51 is described below
commit 2527702a51d1608e65b82a5410731e8d5b7b7876
Author: Julian Reschke <[email protected]>
AuthorDate: Tue Mar 28 12:14:25 2023 +0100
OAK-10164: oak-commons: prepare for switch to shaded guava
---
.../apache/jackrabbit/oak/commons/FileIOUtilsTest.java | 3 +--
.../jackrabbit/oak/commons/io/LazyInputStreamTest.java | 15 +++++++--------
2 files changed, 8 insertions(+), 10 deletions(-)
diff --git
a/oak-commons/src/test/java/org/apache/jackrabbit/oak/commons/FileIOUtilsTest.java
b/oak-commons/src/test/java/org/apache/jackrabbit/oak/commons/FileIOUtilsTest.java
index 04fa852e0b..493eb8a070 100644
---
a/oak-commons/src/test/java/org/apache/jackrabbit/oak/commons/FileIOUtilsTest.java
+++
b/oak-commons/src/test/java/org/apache/jackrabbit/oak/commons/FileIOUtilsTest.java
@@ -40,7 +40,6 @@ import java.util.Random;
import java.util.Set;
import com.google.common.base.Splitter;
-import com.google.common.collect.Iterators;
import com.google.common.collect.Sets;
import com.google.common.primitives.Longs;
import org.apache.commons.io.FileUtils;
@@ -210,7 +209,7 @@ public class FileIOUtilsTest {
}
Iterator<Long> boxedEntries = Longs.asList(entries).iterator();
- Iterator<String> hexEntries = Iterators.transform(boxedEntries, new
com.google.common.base.Function<Long, String>() {
+ Iterator<String> hexEntries =
com.google.common.collect.Iterators.transform(boxedEntries, new
com.google.common.base.Function<Long, String>() {
@Nullable @Override public String apply(@Nullable Long
input) {
return Long.toHexString(input);
}
diff --git
a/oak-commons/src/test/java/org/apache/jackrabbit/oak/commons/io/LazyInputStreamTest.java
b/oak-commons/src/test/java/org/apache/jackrabbit/oak/commons/io/LazyInputStreamTest.java
index 30c770ec0e..d616650011 100644
---
a/oak-commons/src/test/java/org/apache/jackrabbit/oak/commons/io/LazyInputStreamTest.java
+++
b/oak-commons/src/test/java/org/apache/jackrabbit/oak/commons/io/LazyInputStreamTest.java
@@ -19,7 +19,6 @@
package org.apache.jackrabbit.oak.commons.io;
-import static com.google.common.io.Files.asByteSource;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.fail;
@@ -132,11 +131,11 @@ public class LazyInputStreamTest {
createFile();
// test open / close (without reading)
- LazyInputStream in = new LazyInputStream(asByteSource(file));
+ LazyInputStream in = new
LazyInputStream(com.google.common.io.Files.asByteSource(file));
in.close();
// test reading too much and closing too much
- in = new LazyInputStream(asByteSource(file));
+ in = new
LazyInputStream(com.google.common.io.Files.asByteSource(file));
assertEquals(0, in.read());
assertEquals(-1, in.read());
assertEquals(-1, in.read());
@@ -146,7 +145,7 @@ public class LazyInputStreamTest {
in.close();
// test markSupported, mark, and reset
- in = new LazyInputStream(asByteSource(file));
+ in = new
LazyInputStream(com.google.common.io.Files.asByteSource(file));
assertFalse(in.markSupported());
in.mark(1);
assertEquals(0, in.read());
@@ -160,18 +159,18 @@ public class LazyInputStreamTest {
in.close();
// test read(byte[])
- in = new LazyInputStream(asByteSource(file));
+ in = new
LazyInputStream(com.google.common.io.Files.asByteSource(file));
byte[] test = new byte[2];
assertEquals(1, in.read(test));
in.close();
// test read(byte[],int,int)
- in = new LazyInputStream(asByteSource(file));
+ in = new
LazyInputStream(com.google.common.io.Files.asByteSource(file));
assertEquals(1, in.read(test, 0, 2));
in.close();
// test skip
- in = new LazyInputStream(asByteSource(file));
+ in = new
LazyInputStream(com.google.common.io.Files.asByteSource(file));
assertEquals(2, in.skip(2));
assertEquals(-1, in.read(test));
in.close();
@@ -179,7 +178,7 @@ public class LazyInputStreamTest {
createFile();
// test that the file is closed after reading the last byte
- in = new LazyInputStream(asByteSource(file));
+ in = new
LazyInputStream(com.google.common.io.Files.asByteSource(file));
assertEquals(0, in.read());
assertEquals(-1, in.read());