diff options
author | David Pursehouse <david.pursehouse@gmail.com> | 2016-11-09 11:30:15 +0900 |
---|---|---|
committer | David Pursehouse <david.pursehouse@gmail.com> | 2016-11-13 14:31:17 -0800 |
commit | f5a40c26ac9c778efdf06a9aca17e087dd0767d8 (patch) | |
tree | 69a3d0e0d71255b1635db9899b030a7cd344e70f /org.eclipse.jgit.lfs.server/src/org | |
parent | dfa6895687f6c910cd8168fb4151a16d1dfc9cba (diff) | |
download | jgit-f5a40c26ac9c778efdf06a9aca17e087dd0767d8.tar.gz jgit-f5a40c26ac9c778efdf06a9aca17e087dd0767d8.zip |
FileLfsServlet: Make sendError protected
Change-Id: Id89b3cd0da86a535946feb15254737bbf8d855d4
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit.lfs.server/src/org')
-rw-r--r-- | org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/FileLfsServlet.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/FileLfsServlet.java b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/FileLfsServlet.java index 39aaa91d04..cce021c0d4 100644 --- a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/FileLfsServlet.java +++ b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/FileLfsServlet.java @@ -173,7 +173,19 @@ public class FileLfsServlet extends HttpServlet { } } - static void sendError(HttpServletResponse rsp, int status, String message) + /** + * Send an error response. + * + * @param rsp + * the servlet response + * @param status + * HTTP status code + * @param message + * error message + * @throws IOException + * on failure to send the response + */ + protected static void sendError(HttpServletResponse rsp, int status, String message) throws IOException { rsp.setStatus(status); PrintWriter writer = rsp.getWriter(); |