Skip to content
This repository was archived by the owner on Jul 21, 2024. It is now read-only.

Commit f0bdb77

Browse files
committed
fix: 🐛 DoUnlock空指针异常
1 parent c9e87bf commit f0bdb77

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main/java/net/sf/webdav/methods/DoUnlock.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ public void execute(ITransaction transaction, HttpServletRequest req,
7272
if (_resourceLocks.unlock(transaction, lockId, owner)) {
7373
StoredObject so = _store.getStoredObject(
7474
transaction, path);
75+
if (so == null) {
76+
resp.sendError(HttpServletResponse.SC_NOT_FOUND);
77+
return;
78+
}
79+
7580
if (so.isNullResource()) {
7681
_store.removeObject(transaction, path);
7782
}

0 commit comments

Comments
 (0)