diff options
author | Shawn Pearce <spearce@spearce.org> | 2016-11-14 13:23:36 -0500 |
---|---|---|
committer | Gerrit Code Review @ Eclipse.org <gerrit@eclipse.org> | 2016-11-14 13:23:37 -0500 |
commit | 013a4b84fd6d92a529c570cf10f0b233baf4f9bb (patch) | |
tree | a72bda5f89be411d0cea565708c3f1d5115af256 | |
parent | 7b8a0a28bf00074aa61a9c142817fc8b3288850a (diff) | |
parent | f5a40c26ac9c778efdf06a9aca17e087dd0767d8 (diff) | |
download | jgit-013a4b84fd6d92a529c570cf10f0b233baf4f9bb.tar.gz jgit-013a4b84fd6d92a529c570cf10f0b233baf4f9bb.zip |
Merge changes Id89b3cd0,I5b0fb122
* changes:
FileLfsServlet: Make sendError protected
Make ObjectUploadListener public
-rw-r--r-- | org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/FileLfsServlet.java | 14 | ||||
-rw-r--r-- | org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectUploadListener.java | 11 |
2 files changed, 21 insertions, 4 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(); 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 +} |