From: Shawn Pearce Date: Tue, 5 Jul 2016 19:57:58 +0000 (-0700) Subject: ReceivePack: remove unnecessary try-catch around parseCommand X-Git-Tag: v4.5.0.201609210915-r~88 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fchanges%2F51%2F76651%2F1;p=jgit.git ReceivePack: remove unnecessary try-catch around parseCommand This exception is already handled in the outer catch block. Change-Id: Ifc04b8e138732a97b9c0ee323af923b8e52a7f8e --- 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 {