From 0373180321f6b06d50b44017f462cf2297c1e209 Mon Sep 17 00:00:00 2001 From: Shawn Pearce Date: Tue, 5 Jul 2016 12:57:58 -0700 Subject: [PATCH] ReceivePack: remove unnecessary try-catch around parseCommand This exception is already handled in the outer catch block. Change-Id: Ifc04b8e138732a97b9c0ee323af923b8e52a7f8e --- .../src/org/eclipse/jgit/transport/BaseReceivePack.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseReceivePack.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseReceivePack.java index 6df2a4c6f6..9792df4d1a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseReceivePack.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseReceivePack.java @@ -1115,13 +1115,7 @@ public abstract class BaseReceivePack { continue; } - ReceiveCommand cmd; - try { - cmd = parseCommand(line); - } catch (PackProtocolException e) { - sendError(e.getMessage()); - throw e; - } + ReceiveCommand cmd = parseCommand(line); if (cmd.getRefName().equals(Constants.HEAD)) { cmd.setResult(Result.REJECTED_CURRENT_BRANCH); } else { -- 2.39.5