From d1f130f7f92792c03f2521d6748428fe33535a21 Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Wed, 29 Jun 2011 09:51:54 -0700 Subject: [PATCH] Add String form of PackInvalidException constructor This way the path can be supplied as a string, without first converting to a java.io.File. Change-Id: I54d9bb9867556cd98b378c0762054b31497459cb --- .../eclipse/jgit/errors/PackInvalidException.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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 59354ddb70..3db720a927 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/errors/PackInvalidException.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/errors/PackInvalidException.java @@ -60,6 +60,16 @@ public class PackInvalidException extends IOException { * path of the invalid pack file. */ public PackInvalidException(final File path) { - super(MessageFormat.format(JGitText.get().packFileInvalid, path.getAbsolutePath())); + this(path.getAbsolutePath()); + } + + /** + * Construct a pack invalid error. + * + * @param path + * path of the invalid pack file. + */ + public PackInvalidException(final String path) { + super(MessageFormat.format(JGitText.get().packFileInvalid, path)); } } -- 2.39.5