From 0d9e4867142575ec6b4aa67a39adfc2404cc6845 Mon Sep 17 00:00:00 2001 From: Michael Keppler Date: Mon, 31 Dec 2018 08:31:09 +0100 Subject: Replace deprecated FirstLine by FirstCommand and allow package org.eclipse.jgit.http.server to use package org.eclipse.jgit.internal.transport.parser. Change-Id: Ief330c3e75a735853d0a5a265a9ff56fb5128b99 Signed-off-by: Michael Keppler Signed-off-by: Matthias Sohn --- .../src/org/eclipse/jgit/http/server/GitSmartHttpTools.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'org.eclipse.jgit.http.server') diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/GitSmartHttpTools.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/GitSmartHttpTools.java index ee4b32efb7..8961d1b2c8 100644 --- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/GitSmartHttpTools.java +++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/GitSmartHttpTools.java @@ -63,6 +63,7 @@ import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.eclipse.jgit.internal.transport.parser.FirstCommand; import org.eclipse.jgit.internal.transport.parser.FirstWant; import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.transport.PacketLineIn; @@ -287,7 +288,7 @@ public class GitSmartHttpTools { // not have a ReceivePack, or it might not have read any of the request. // So, cheat and read the first line. String line = new PacketLineIn(req.getInputStream()).readString(); - ReceivePack.FirstLine parsed = new ReceivePack.FirstLine(line); + FirstCommand parsed = FirstCommand.fromLine(line); return parsed.getCapabilities().contains(CAPABILITY_SIDE_BAND_64K); } catch (IOException e) { // Probably the connection is closed and a subsequent write will fail, but -- cgit v1.2.3