diff options
Diffstat (limited to 'gerrit-httpd/src/main/java/com/google/gerrit/httpd/rpc/patch/PatchScriptFactory.java')
-rw-r--r-- | gerrit-httpd/src/main/java/com/google/gerrit/httpd/rpc/patch/PatchScriptFactory.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/rpc/patch/PatchScriptFactory.java b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/rpc/patch/PatchScriptFactory.java index 66b32785b9..d61e6e755f 100644 --- a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/rpc/patch/PatchScriptFactory.java +++ b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/rpc/patch/PatchScriptFactory.java @@ -31,6 +31,7 @@ import com.google.gerrit.server.CurrentUser; import com.google.gerrit.server.IdentifiedUser; import com.google.gerrit.server.account.AccountInfoCacheFactory; import com.google.gerrit.server.git.GitRepositoryManager; +import com.google.gerrit.server.git.LargeObjectException; import com.google.gerrit.server.patch.PatchList; import com.google.gerrit.server.patch.PatchListCache; import com.google.gerrit.server.patch.PatchListEntry; @@ -120,7 +121,8 @@ class PatchScriptFactory extends Handler<PatchScript> { } @Override - public PatchScript call() throws OrmException, NoSuchChangeException { + public PatchScript call() throws OrmException, NoSuchChangeException, + LargeObjectException { validatePatchSetId(psa); validatePatchSetId(psb); @@ -156,6 +158,8 @@ class PatchScriptFactory extends Handler<PatchScript> { } catch (IOException e) { log.error("File content unavailable", e); throw new NoSuchChangeException(changeId, e); + } catch (org.eclipse.jgit.errors.LargeObjectException err) { + throw new LargeObjectException("File content is too large", err); } } finally { git.close(); |