From c7d8fbfaadffdd8cb7e386bb89f031f49e91c23a Mon Sep 17 00:00:00 2001 From: Jacek Centkowski Date: Thu, 24 Nov 2016 10:58:14 +0100 Subject: Expose getObjectToTransfer method of FileLfsServlet Providing own implementation to doGet/doPut methods is troublesome when this method is private. Change-Id: I098cdc5cb90410eaaebc56c88c2d9e168584dd6d Signed-off-by: Jacek Centkowski Signed-off-by: David Pursehouse --- .../org/eclipse/jgit/lfs/server/fs/FileLfsServlet.java | 15 ++++++++++++++- 1 file changed, 14 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 a6079671de..a8e3c11e27 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 @@ -125,7 +125,20 @@ public class FileLfsServlet extends HttpServlet { } } - private AnyLongObjectId getObjectToTransfer(HttpServletRequest req, + /** + * Retrieve object id from request + * + * @param req + * servlet request + * @param rsp + * servlet response + * @return object id, or null if the object id could not be + * retrieved + * @throws IOException + * if an I/O error occurs + * @since 4.6 + */ + protected AnyLongObjectId getObjectToTransfer(HttpServletRequest req, HttpServletResponse rsp) throws IOException { String info = req.getPathInfo(); int length = 1 + Constants.LONG_OBJECT_ID_STRING_LENGTH; -- cgit v1.2.3