aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org/eclipse/jgit/errors
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2019-04-19 12:35:26 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2019-04-19 12:36:24 +0200
commit710d00b85e9419c7feaed71a1945351dab486f71 (patch)
treeb0cfa70bd988e7fe0a24b7766091892bac3f2720 /org.eclipse.jgit/src/org/eclipse/jgit/errors
parentb29bb5cbb00748fb7a4f89c5177391282d7aef66 (diff)
parentf90c526cfb8259bf1c4c98d07457df1343c57433 (diff)
downloadjgit-710d00b85e9419c7feaed71a1945351dab486f71.tar.gz
jgit-710d00b85e9419c7feaed71a1945351dab486f71.zip
Merge branch 'stable-4.11' into stable-5.0
* stable-4.11: Prepare 4.11.9-SNAPSHOT builds JGit v4.11.8.201904181247-r Prepare 4.9.11-SNAPSHOT builds JGit v4.9.10.201904181027-r Prepare 4.7.10-SNAPSHOT builds JGit v4.7.9.201904161809-r Prepare 4.5.8-SNAPSHOT builds JGit v4.5.7.201904151645-r Remember the cause for invalidating a packfile Fix API problem filters Fix pack files scan when filesnapshot isn't modified Change-Id: I9b7f9faf3dc584068456f1ae2cacc4ce5137d4ad Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/errors')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/errors/PackInvalidException.java34
1 files changed, 32 insertions, 2 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/errors/PackInvalidException.java b/org.eclipse.jgit/src/org/eclipse/jgit/errors/PackInvalidException.java
index a83de06262..b238ab4718 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/errors/PackInvalidException.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/errors/PackInvalidException.java
@@ -60,9 +60,24 @@ public class PackInvalidException extends IOException {
*
* @param path
* path of the invalid pack file.
+ * @deprecated Use {@link #PackInvalidException(File, Throwable)}.
*/
+ @Deprecated
public PackInvalidException(File path) {
- this(path.getAbsolutePath());
+ this(path, null);
+ }
+
+ /**
+ * Construct a pack invalid error with cause.
+ *
+ * @param path
+ * path of the invalid pack file.
+ * @param cause
+ * cause of the pack file becoming invalid.
+ * @since 4.5.7
+ */
+ public PackInvalidException(File path, Throwable cause) {
+ this(path.getAbsolutePath(), cause);
}
/**
@@ -70,8 +85,23 @@ public class PackInvalidException extends IOException {
*
* @param path
* path of the invalid pack file.
+ * @deprecated Use {@link #PackInvalidException(String, Throwable)}.
*/
+ @Deprecated
public PackInvalidException(String path) {
- super(MessageFormat.format(JGitText.get().packFileInvalid, path));
+ this(path, null);
+ }
+
+ /**
+ * Construct a pack invalid error with cause.
+ *
+ * @param path
+ * path of the invalid pack file.
+ * @param cause
+ * cause of the pack file becoming invalid.
+ * @since 4.5.7
+ */
+ public PackInvalidException(String path, Throwable cause) {
+ super(MessageFormat.format(JGitText.get().packFileInvalid, path), cause);
}
}