Skip to content

Commit d71a297

Browse files
committed
Allow LockManager to throw IOException on errors
1 parent ab90798 commit d71a297

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

gitlfs-server/src/main/java/ru/bozaro/gitlfs/server/LockManager.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@ public interface LockManager {
2121

2222
interface LockRead {
2323
@NotNull
24-
List<Lock> getLocks(@Nullable String path, @Nullable String lockId, @Nullable Ref ref);
24+
List<Lock> getLocks(@Nullable String path, @Nullable String lockId, @Nullable Ref ref) throws IOException;
2525
}
2626

2727
interface LockWrite extends LockRead {
2828
@NotNull
29-
Lock lock(@NotNull String path, @Nullable Ref ref) throws LockConflictException;
29+
Lock lock(@NotNull String path, @Nullable Ref ref) throws LockConflictException, IOException;
3030

3131
@Nullable
32-
Lock unlock(@NotNull String lockId, boolean force, @Nullable Ref ref) throws LockConflictException;
32+
Lock unlock(@NotNull String lockId, boolean force, @Nullable Ref ref) throws LockConflictException, IOException;
3333

3434
@NotNull
35-
VerifyLocksResult verifyLocks(@Nullable Ref ref);
35+
VerifyLocksResult verifyLocks(@Nullable Ref ref) throws IOException;
3636
}
3737
}

gitlfs-server/src/main/java/ru/bozaro/gitlfs/server/LocksServlet.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ private ResponseWriter deleteLock(@NotNull HttpServletRequest req, @NotNull Lock
9999
}
100100

101101
@NotNull
102-
private ResponseWriter listLocks(@NotNull HttpServletRequest req, @NotNull LockManager.LockRead lockRead) {
102+
private ResponseWriter listLocks(@NotNull HttpServletRequest req, @NotNull LockManager.LockRead lockRead) throws IOException {
103103
final String refName = req.getParameter("refspec");
104104

105105
final String path = req.getParameter("path");

0 commit comments

Comments
 (0)