From 3a2d466d026991b4dfe8ae590b38641f5ae1ba70 Mon Sep 17 00:00:00 2001 From: Michael Gibney Date: Wed, 28 Feb 2024 17:47:57 -0500 Subject: [PATCH] tidy --- .../core/src/java/org/apache/solr/storage/TeeDirectory.java | 6 +++++- .../java/org/apache/solr/storage/TeeDirectoryFactory.java | 3 ++- .../src/test/org/apache/solr/search/TestIndexSearcher.java | 1 - 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/solr/core/src/java/org/apache/solr/storage/TeeDirectory.java b/solr/core/src/java/org/apache/solr/storage/TeeDirectory.java index 66f0e001718..28d63a9f311 100644 --- a/solr/core/src/java/org/apache/solr/storage/TeeDirectory.java +++ b/solr/core/src/java/org/apache/solr/storage/TeeDirectory.java @@ -196,7 +196,11 @@ public void ensureValid() throws IOException { public void removeAssociated() throws IOException { synchronized (persistentFunction) { if (associatedPaths != null) { - IOUtils.rm(associatedPaths.stream().map(Path::of).filter(p -> p.toFile().exists()).toArray(Path[]::new)); + IOUtils.rm( + associatedPaths.stream() + .map(Path::of) + .filter(p -> p.toFile().exists()) + .toArray(Path[]::new)); } } } diff --git a/solr/core/src/java/org/apache/solr/storage/TeeDirectoryFactory.java b/solr/core/src/java/org/apache/solr/storage/TeeDirectoryFactory.java index 1e526b0eaea..e2c115c3125 100644 --- a/solr/core/src/java/org/apache/solr/storage/TeeDirectoryFactory.java +++ b/solr/core/src/java/org/apache/solr/storage/TeeDirectoryFactory.java @@ -267,7 +267,8 @@ static String getScopeName(String accessDir, String path) { Path a = Path.of(accessDir); Path relative = a.relativize(p); if (relative.getNameCount() > 0) { - accessDir = a.resolve(relative.getName(0)).toString().concat("/TeeDirectoryFactory-access"); + accessDir = + a.resolve(relative.getName(0)).toString().concat("/TeeDirectoryFactory-access"); } } } diff --git a/solr/core/src/test/org/apache/solr/search/TestIndexSearcher.java b/solr/core/src/test/org/apache/solr/search/TestIndexSearcher.java index 3687b7db8b6..b511dd7075d 100644 --- a/solr/core/src/test/org/apache/solr/search/TestIndexSearcher.java +++ b/solr/core/src/test/org/apache/solr/search/TestIndexSearcher.java @@ -18,7 +18,6 @@ import com.codahale.metrics.Gauge; import com.codahale.metrics.Metric; - import java.io.Closeable; import java.io.IOException; import java.lang.reflect.Array;