This is an automated email from the ASF dual-hosted git repository.
dsmiley pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/branch_9x by this push:
new 1758ea350aa SOLR-17805: Fix backport (Path->File)
1758ea350aa is described below
commit 1758ea350aa7f977d18686cc96b04af022758294
Author: David Smiley <[email protected]>
AuthorDate: Sun Jul 6 10:49:33 2025 -0400
SOLR-17805: Fix backport (Path->File)
---
solr/core/src/java/org/apache/solr/update/UpdateLog.java | 2 +-
solr/core/src/test/org/apache/solr/update/UpdateLogTest.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/solr/core/src/java/org/apache/solr/update/UpdateLog.java
b/solr/core/src/java/org/apache/solr/update/UpdateLog.java
index b9862d7f008..a23240802b7 100644
--- a/solr/core/src/java/org/apache/solr/update/UpdateLog.java
+++ b/solr/core/src/java/org/apache/solr/update/UpdateLog.java
@@ -1628,7 +1628,7 @@ public class UpdateLog implements PluginInfoInitialized,
SolrMetricProducer {
throw new SolrException(
ErrorCode.SERVER_ERROR, "Cannot recover from already existing
logs");
}
- tlogFiles = getLogList(tlogDir);
+ tlogFiles = getLogList(tlogDir.toFile());
id = scanLastLogId(tlogFiles) + 1; // add 1 since we create a new log
}
tlog = newTransactionLog(newLogPath, globalStrings, false);
diff --git a/solr/core/src/test/org/apache/solr/update/UpdateLogTest.java
b/solr/core/src/test/org/apache/solr/update/UpdateLogTest.java
index c951ad9141c..3f8d8494114 100644
--- a/solr/core/src/test/org/apache/solr/update/UpdateLogTest.java
+++ b/solr/core/src/test/org/apache/solr/update/UpdateLogTest.java
@@ -314,7 +314,7 @@ public class UpdateLogTest extends SolrTestCaseJ4 {
private long scanLastLogId(Path tlogDir) throws IOException {
try (UpdateLog uLog = new UpdateLog()) {
- String[] tlogFiles = uLog.getLogList(tlogDir);
+ String[] tlogFiles = uLog.getLogList(tlogDir.toFile());
return UpdateLog.scanLastLogId(tlogFiles);
}
}