diff options
author | David Pursehouse <david.pursehouse@gmail.com> | 2017-12-19 14:08:38 +0900 |
---|---|---|
committer | David Pursehouse <david.pursehouse@gmail.com> | 2017-12-19 23:27:53 +0900 |
commit | c228f201a6b53ba33421380b6dcb854c315a3f3e (patch) | |
tree | 6a7a2da7f56f48bcd9dc6be541421b9b34e20e56 /org.eclipse.jgit | |
parent | 06bab95e00891b40c4afe65f29e5969fc9df4f2a (diff) | |
download | jgit-c228f201a6b53ba33421380b6dcb854c315a3f3e.tar.gz jgit-c228f201a6b53ba33421380b6dcb854c315a3f3e.zip |
LargeObjectException: Add constructor that takes Throwable
Change-Id: I500959286075f8ba4d0aa5820febd28c9c94ea1b
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/errors/LargeObjectException.java | 11 | ||||
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LargePackedWholeObject.java | 4 |
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); } } |