1
2
3
4
5
6
7
8
9
10
11
12 package org.eclipse.jgit.errors;
13
14 import java.util.Map;
15
16 import org.eclipse.jgit.internal.JGitText;
17 import org.eclipse.jgit.lib.ObjectId;
18 import org.eclipse.jgit.transport.URIish;
19
20
21
22
23 public class MissingBundlePrerequisiteException extends TransportException {
24 private static final long serialVersionUID = 1L;
25
26 private static String format(Map<ObjectId, String> missingCommits) {
27 final StringBuilder r = new StringBuilder();
28 r.append(JGitText.get().missingPrerequisiteCommits);
29 for (Map.Entry<ObjectId, String> e : missingCommits.entrySet()) {
30 r.append("\n ");
31 r.append(e.getKey().name());
32 if (e.getValue() != null)
33 r.append(" ").append(e.getValue());
34 }
35 return r.toString();
36 }
37
38
39
40
41
42
43
44
45
46
47 public MissingBundlePrerequisiteException(final URIish uri,
48 final Map<ObjectId, String> missingCommits) {
49 super(uri, format(missingCommits));
50 }
51 }