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 b5f9e2f02..c4f662be9 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseReceivePack.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseReceivePack.java @@ -67,6 +67,7 @@ import java.util.Map; import java.util.Set; import java.util.concurrent.TimeUnit; +import org.eclipse.jgit.errors.InvalidObjectIdException; import org.eclipse.jgit.errors.MissingObjectException; import org.eclipse.jgit.errors.PackProtocolException; import org.eclipse.jgit.errors.TooLargePackException; @@ -1147,7 +1148,7 @@ public abstract class BaseReceivePack { try { oldId = ObjectId.fromString(oldStr); newId = ObjectId.fromString(newStr); - } catch (IllegalArgumentException e) { + } catch (InvalidObjectIdException e) { throw new PackProtocolException( JGitText.get().errorInvalidProtocolWantedOldNewRef, e); }