Browse Source

LargeObjectException: Add constructor that takes Throwable

Change-Id: I500959286075f8ba4d0aa5820febd28c9c94ea1b
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
stable-4.10
David Pursehouse 7 years ago
parent
commit
c228f201a6
  1. 11
      org.eclipse.jgit/src/org/eclipse/jgit/errors/LargeObjectException.java
  2. 4
      org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LargePackedWholeObject.java

11
org.eclipse.jgit/src/org/eclipse/jgit/errors/LargeObjectException.java

@ -64,6 +64,17 @@ public class LargeObjectException extends RuntimeException {
// Do nothing.
}
/**
* 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.
*

4
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);
}
}

Loading…
Cancel
Save