Skip to content

Commit ed55b33

Browse files
committed
[bugfix] Make sure to reload the collection after removing a resource
Closes eXist-db/exist#5711
1 parent 35f8585 commit ed55b33

File tree

3 files changed

+29
-4
lines changed

3 files changed

+29
-4
lines changed

exist-core/pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,7 @@
746746
<include>src/main/java/org/exist/client/DocumentView.java</include>
747747
<include>src/main/java/org/exist/client/IndexDialog.java</include>
748748
<include>src/main/java/org/exist/client/InteractiveClient.java</include>
749+
<include>src/main/java/org/exist/client/NewResourceDialog.java</include>
749750
<include>src/main/java/org/exist/client/QueryDialog.java</include>
750751
<include>src/main/java/org/exist/client/TriggersDialog.java</include>
751752
<include>src/main/java/org/exist/client/UploadDialog.java</include>
@@ -948,6 +949,7 @@
948949
<exclude>src/main/java/org/exist/client/DocumentView.java</exclude>
949950
<exclude>src/main/java/org/exist/client/IndexDialog.java</exclude>
950951
<exclude>src/main/java/org/exist/client/InteractiveClient.java</exclude>
952+
<exclude>src/main/java/org/exist/client/NewResourceDialog.java</exclude>
951953
<exclude>src/main/java/org/exist/client/QueryDialog.java</exclude>
952954
<exclude>src/main/java/org/exist/client/TriggersDialog.java</exclude>
953955
<exclude>src/main/java/org/exist/client/UploadDialog.java</exclude>

exist-core/src/main/java/org/exist/client/ClientFrame.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -780,6 +780,7 @@ private void removeAction(final ActionEvent ev) {
780780

781781
try {
782782
removeRootCollection.close();
783+
client.reloadCollection();
783784
} catch (final XMLDBException e) {
784785
showErrorMessage(e.getMessage(), e);
785786
}

exist-core/src/main/java/org/exist/client/NewResourceDialog.java

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,28 @@
11
/*
2+
* Elemental
3+
* Copyright (C) 2024, Evolved Binary Ltd
4+
*
5+
6+
* https://www.evolvedbinary.com | https://www.elemental.xyz
7+
*
8+
* This library is free software; you can redistribute it and/or
9+
* modify it under the terms of the GNU Lesser General Public
10+
* License as published by the Free Software Foundation; version 2.1.
11+
*
12+
* This library is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15+
* Lesser General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU Lesser General Public
18+
* License along with this library; if not, write to the Free Software
19+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20+
*
21+
* NOTE: Parts of this file contain code from 'The eXist-db Authors'.
22+
* The original license header is included below.
23+
*
24+
* =====================================================================
25+
*
226
* eXist-db Open Source Native XML Database
327
* Copyright (C) 2001 The eXist-db Authors
428
*
@@ -47,6 +71,8 @@
4771
import org.xmldb.api.modules.BinaryResource;
4872
import org.xmldb.api.modules.XMLResource;
4973

74+
import static org.exist.util.StringUtil.isNullOrEmpty;
75+
5076
/**
5177
*
5278
* @author <a href="mailto:[email protected]">Adam Retter</a>
@@ -301,8 +327,4 @@ private void createResource(final ResourceType resourceType, final String filena
301327
ClientFrame.showErrorMessage(xmldbe.getMessage(), xmldbe);
302328
}
303329
}
304-
305-
private boolean isNullOrEmpty(String str) {
306-
return str == null || str.isEmpty();
307-
}
308330
}

0 commit comments

Comments
 (0)