You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by dw...@apache.org on 2025/07/03 08:50:19 UTC
(lucene) 01/02: NPE exception could occur in Luke on Windows when using network shares (#14880)
This is an automated email from the ASF dual-hosted git repository.
dweiss pushed a commit to branch branch_10x
in repository https://gitbox.apache.org/repos/asf/lucene.git
commit 99b8685e20018e7d1211eeb5ec58428cf8aeeea9
Author: Dawid Weiss <da...@carrotsearch.com>
AuthorDate: Thu Jul 3 10:48:48 2025 +0200
NPE exception could occur in Luke on Windows when using network shares (#14880)
---
lucene/CHANGES.txt | 2 ++
.../desktop/components/dialog/menubar/OpenIndexDialogFactory.java | 6 +++++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index a48835961df..e1c69c89214 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -114,6 +114,8 @@ Changes in Runtime Behavior
Bug Fixes
---------------------
+* GITHUB#14880: NPE exception could occur in Luke on Windows when using network shares (wuth)
+
* GITHUB#14654: ValueSource.fromDoubleValuesSource(dvs).getSortField() would throw errors when
used if the DoubleValuesSource needed scores. (David Smiley)
diff --git a/lucene/luke/src/java/org/apache/lucene/luke/app/desktop/components/dialog/menubar/OpenIndexDialogFactory.java b/lucene/luke/src/java/org/apache/lucene/luke/app/desktop/components/dialog/menubar/OpenIndexDialogFactory.java
index b647eb1eb59..d59a7a32a5d 100644
--- a/lucene/luke/src/java/org/apache/lucene/luke/app/desktop/components/dialog/menubar/OpenIndexDialogFactory.java
+++ b/lucene/luke/src/java/org/apache/lucene/luke/app/desktop/components/dialog/menubar/OpenIndexDialogFactory.java
@@ -293,7 +293,11 @@ public final class OpenIndexDialogFactory implements DialogOpener.DialogFactory
if (!history.isEmpty()) {
Path path = Paths.get(history.get(0));
if (Files.exists(path)) {
- return path.getParent().toAbsolutePath().toFile();
+ if (path.getParent() != null) {
+ return path.getParent().toAbsolutePath().toFile();
+ } else {
+ return path.toAbsolutePath().toFile();
+ }
}
}
return null;