You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by re...@apache.org on 2025/01/31 16:43:39 UTC

(jackrabbit-oak) branch OAK-11448 created (now 6460989356)

This is an automated email from the ASF dual-hosted git repository.

reschke pushed a change to branch OAK-11448
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


      at 6460989356 OAK-11448: Remove usage of Guava Files.readLines()

This branch includes the following new commits:

     new 6460989356 OAK-11448: Remove usage of Guava Files.readLines()

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(jackrabbit-oak) 01/01: OAK-11448: Remove usage of Guava Files.readLines()

Posted by re...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

reschke pushed a commit to branch OAK-11448
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git

commit 64609893566ad2572dc3b8ccaa46ec95c3a660b0
Author: Julian Reschke <re...@apache.org>
AuthorDate: Fri Jan 31 17:43:22 2025 +0100

    OAK-11448: Remove usage of Guava Files.readLines()
---
 .../org/apache/jackrabbit/oak/commons/sort/ExternalSortTest.java    | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/oak-commons/src/test/java/org/apache/jackrabbit/oak/commons/sort/ExternalSortTest.java b/oak-commons/src/test/java/org/apache/jackrabbit/oak/commons/sort/ExternalSortTest.java
index e00edad706..f0eee1eb2d 100644
--- a/oak-commons/src/test/java/org/apache/jackrabbit/oak/commons/sort/ExternalSortTest.java
+++ b/oak-commons/src/test/java/org/apache/jackrabbit/oak/commons/sort/ExternalSortTest.java
@@ -18,7 +18,6 @@ package org.apache.jackrabbit.oak.commons.sort;
 
 import net.jpountz.lz4.LZ4FrameInputStream;
 import net.jpountz.lz4.LZ4FrameOutputStream;
-import org.apache.jackrabbit.guava.common.io.Files;
 import org.apache.jackrabbit.oak.commons.Compression;
 import org.junit.After;
 import org.junit.Before;
@@ -41,6 +40,7 @@ import java.io.OutputStreamWriter;
 import java.nio.channels.FileChannel;
 import java.nio.charset.Charset;
 import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
@@ -458,7 +458,7 @@ public class ExternalSortTest {
         try (BufferedWriter bufferedWriter = new BufferedWriter(
                 new OutputStreamWriter(algorithm.getOutputStream(new FileOutputStream(compressedFile)),
                         Charset.defaultCharset()));) {
-            Files.readLines(uncompressedInputFile, Charset.defaultCharset()).forEach(n -> {
+            Files.lines(uncompressedInputFile.toPath(), Charset.defaultCharset()).forEach(n -> {
                 try {
                     bufferedWriter.write(n + "\n");
                 } catch (IOException e) {
@@ -511,7 +511,7 @@ public class ExternalSortTest {
         Collections.sort(testLines);
 
         List<TestLine> linesFromSortedFile = new ArrayList<>();
-        Files.readLines(out, charset).forEach(line -> linesFromSortedFile.add(new TestLine(line)));
+        Files.lines(out.toPath(), charset).forEach(line -> linesFromSortedFile.add(new TestLine(line)));
 
         assertEquals(testLines, linesFromSortedFile);