public class MissingObjectException extends IOException {
private static final long serialVersionUID = 1L;
+ private final ObjectId missing;
+
/**
* Construct a MissingObjectException for the specified object id.
* Expected type is reported to simplify tracking down the problem.
*/
public MissingObjectException(final ObjectId id, final String type) {
super(MessageFormat.format(JGitText.get().missingObject, type, id.name()));
+ missing = id.copy();
}
/**
public MissingObjectException(final ObjectId id, final int type) {
this(id, Constants.typeString(type));
}
+
+ /** @return the ObjectId that was not found. */
+ public ObjectId getObjectId() {
+ return missing;
+ }
}