]> source.dussan.org Git - jgit.git/commitdiff
ReceivePack: remove unnecessary try-catch around parseCommand 51/76651/1
authorShawn Pearce <spearce@spearce.org>
Tue, 5 Jul 2016 19:57:58 +0000 (12:57 -0700)
committerShawn Pearce <spearce@spearce.org>
Tue, 5 Jul 2016 19:57:58 +0000 (12:57 -0700)
This exception is already handled in the outer catch block.

Change-Id: Ifc04b8e138732a97b9c0ee323af923b8e52a7f8e

org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseReceivePack.java

index 6df2a4c6f6dba71f646aebea534fb84d4523be77..9792df4d1a1f51c4c29a7b89c6ad854e82b3e880 100644 (file)
@@ -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 {