summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/errors/LargeObjectException.java11
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LargePackedWholeObject.java4
2 files changed, 12 insertions, 3 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/errors/LargeObjectException.java b/org.eclipse.jgit/src/org/eclipse/jgit/errors/LargeObjectException.java
index 8873f7e680..dfdf50d35d 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/errors/LargeObjectException.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/errors/LargeObjectException.java
@@ -65,6 +65,17 @@ public class LargeObjectException extends RuntimeException {
}
/**
+ * Create a large object exception, where the object isn't known.
+ *
+ * @param cause
+ * the cause
+ * @since 4.10
+ */
+ public LargeObjectException(Throwable cause) {
+ initCause(cause);
+ }
+
+ /**
* Create a large object exception, naming the object that is too big.
*
* @param id
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LargePackedWholeObject.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LargePackedWholeObject.java
index 229d3ff247..8c42aaa2b7 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LargePackedWholeObject.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LargePackedWholeObject.java
@@ -101,9 +101,7 @@ class LargePackedWholeObject extends ObjectLoader {
try {
throw new LargeObjectException(getObjectId());
} catch (IOException cannotObtainId) {
- LargeObjectException err = new LargeObjectException();
- err.initCause(cannotObtainId);
- throw err;
+ throw new LargeObjectException(cannotObtainId);
}
}