From dfa6895687f6c910cd8168fb4151a16d1dfc9cba Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Sat, 12 Nov 2016 13:22:24 -0800 Subject: Make ObjectUploadListener public Change-Id: I5b0fb1220bc0e5c660f1b5373abc5868d985c60b Signed-off-by: David Pursehouse --- .../org/eclipse/jgit/lfs/server/fs/ObjectUploadListener.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectUploadListener.java b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectUploadListener.java index bb31743081..84e4e6f1c6 100644 --- a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectUploadListener.java +++ b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectUploadListener.java @@ -64,9 +64,11 @@ import org.eclipse.jgit.lfs.lib.AnyLongObjectId; import org.eclipse.jgit.lfs.lib.Constants; /** - * Handle asynchronous object upload + * Handle asynchronous object upload. + * + * @since 4.6 */ -class ObjectUploadListener implements ReadListener { +public class ObjectUploadListener implements ReadListener { private static Logger LOG = Logger .getLogger(ObjectUploadListener.class.getName()); @@ -139,6 +141,9 @@ class ObjectUploadListener implements ReadListener { close(); } + /** + * @throws IOException + */ protected void close() throws IOException { try { inChannel.close(); @@ -174,4 +179,4 @@ class ObjectUploadListener implements ReadListener { LOG.log(Level.SEVERE, ex.getMessage(), ex); } } -} \ No newline at end of file +} -- cgit v1.2.3 From f5a40c26ac9c778efdf06a9aca17e087dd0767d8 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Wed, 9 Nov 2016 11:30:15 +0900 Subject: FileLfsServlet: Make sendError protected Change-Id: Id89b3cd0da86a535946feb15254737bbf8d855d4 Signed-off-by: David Pursehouse --- .../src/org/eclipse/jgit/lfs/server/fs/FileLfsServlet.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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(); -- cgit v1.2.3