diff --git a/Ghidra/Features/GhidraServer/src/main/java/ghidra/server/remote/RepositoryHandleImpl.java b/Ghidra/Features/GhidraServer/src/main/java/ghidra/server/remote/RepositoryHandleImpl.java index 0bbbae1f1a..8a81debdab 100644 --- a/Ghidra/Features/GhidraServer/src/main/java/ghidra/server/remote/RepositoryHandleImpl.java +++ b/Ghidra/Features/GhidraServer/src/main/java/ghidra/server/remote/RepositoryHandleImpl.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -21,8 +21,7 @@ import java.rmi.NoSuchObjectException; import java.rmi.RemoteException; import java.rmi.server.UnicastRemoteObject; import java.rmi.server.Unreferenced; -import java.util.HashMap; -import java.util.LinkedList; +import java.util.*; import db.buffers.*; import ghidra.framework.remote.*; @@ -118,7 +117,9 @@ public class RepositoryHandleImpl extends UnicastRemoteObject try { repository.log(null, "Clearning " + transientCheckouts.size() + " transiet checkouts", currentUser); - for (String pathname : transientCheckouts.keySet()) { + + ArrayList pathnames = new ArrayList<>(transientCheckouts.keySet()); + for (String pathname : pathnames) { int index = pathname.lastIndexOf(FileSystem.SEPARATOR_CHAR); String parentPath = FileSystem.SEPARATOR; if (index != 0) { @@ -127,10 +128,12 @@ public class RepositoryHandleImpl extends UnicastRemoteObject String itemName = pathname.substring(index + 1); ItemCheckoutStatus transientCheckout = transientCheckouts.get(pathname); - - // Since dropped transient checkouts could occur in large volume due to headless - // processing, don't bother sending notification - terminateCheckout(parentPath, itemName, transientCheckout.getCheckoutId(), false); + if (transientCheckout != null) { + // Since dropped transient checkouts could occur in large volume due to headless + // processing, don't bother sending notification + terminateCheckout(parentPath, itemName, transientCheckout.getCheckoutId(), + false); + } } } catch (IOException e) { diff --git a/Ghidra/RuntimeScripts/Common/server/svrREADME.html b/Ghidra/RuntimeScripts/Common/server/svrREADME.html index d7c6dd8487..e8a2e0e19b 100644 --- a/Ghidra/RuntimeScripts/Common/server/svrREADME.html +++ b/Ghidra/RuntimeScripts/Common/server/svrREADME.html @@ -60,6 +60,7 @@ typewriter {