author | weijun |
Wed, 01 Aug 2018 13:35:08 +0800 | |
changeset 51272 | 9d92ff04a29c |
parent 47216 | 71c04702a3d5 |
permissions | -rw-r--r-- |
2 | 1 |
/* |
23010
6dadb192ad81
8029235: Update copyright year to match last edit in jdk8 jdk repository for 2013
lana
parents:
21278
diff
changeset
|
2 |
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. |
2 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
5506 | 7 |
* published by the Free Software Foundation. Oracle designates this |
2 | 8 |
* particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
2 | 10 |
* |
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
5506 | 21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
2 | 24 |
*/ |
25 |
package sun.security.provider.certpath; |
|
26 |
||
27 |
import java.util.ArrayList; |
|
28 |
import java.util.Collections; |
|
29 |
import java.util.Iterator; |
|
30 |
import java.util.List; |
|
31 |
||
32 |
/** |
|
33 |
* An AdjacencyList is used to store the history of certification paths |
|
34 |
* attempted in constructing a path from an initiator to a target. The |
|
35 |
* AdjacencyList is initialized with a <code>List</code> of |
|
36 |
* <code>List</code>s, where each sub-<code>List</code> contains objects of |
|
37 |
* type <code>Vertex</code>. A <code>Vertex</code> describes one possible or |
|
38 |
* actual step in the chain building process, and the associated |
|
39 |
* <code>Certificate</code>. Specifically, a <code>Vertex</code> object |
|
40 |
* contains a <code>Certificate</code> and an index value referencing the |
|
41 |
* next sub-list in the process. If the index value is -1 then this |
|
42 |
* <code>Vertex</code> doesn't continue the attempted build path. |
|
43 |
* <p> |
|
44 |
* Example: |
|
45 |
* <p> |
|
46 |
* Attempted Paths:<ul> |
|
47 |
* <li>C1->C2->C3 |
|
48 |
* <li>C1->C4->C5 |
|
49 |
* <li>C1->C4->C6 |
|
50 |
* <li>C1->C4->C7 |
|
51 |
* <li>C1->C8->C9 |
|
52 |
* <li>C1->C10->C11 |
|
53 |
* </ul> |
|
54 |
* <p> |
|
55 |
* AdjacencyList structure:<ul> |
|
56 |
* <li>AL[0] = C1,1 |
|
57 |
* <li>AL[1] = C2,2 =>C4,3 =>C8,4 =>C10,5 |
|
58 |
* <li>AL[2] = C3,-1 |
|
59 |
* <li>AL[3] = C5,-1 =>C6,-1 =>C7,-1 |
|
60 |
* <li>AL[4] = C9,-1 |
|
61 |
* <li>AL[5] = C11,-1 |
|
62 |
* </ul> |
|
63 |
* <p> |
|
64 |
* The iterator method returns objects of type <code>BuildStep</code>, not |
|
65 |
* objects of type <code>Vertex</code>. |
|
66 |
* A <code>BuildStep</code> contains a <code>Vertex</code> and a result code, |
|
21278 | 67 |
* accessible via getResult method. There are five result values. |
2 | 68 |
* <code>POSSIBLE</code> denotes that the current step represents a |
69 |
* <code>Certificate</code> that the builder is considering at this point in |
|
70 |
* the build. <code>FOLLOW</code> denotes a <code>Certificate</code> (one of |
|
71 |
* those noted as <code>POSSIBLE</code>) that the builder is using to try |
|
72 |
* extending the chain. <code>BACK</code> represents that a |
|
73 |
* <code>FOLLOW</code> was incorrect, and is being removed from the chain. |
|
74 |
* There is exactly one <code>FOLLOW</code> for each <code>BACK</code>. The |
|
75 |
* values <code>SUCCEED</code> and <code>FAIL</code> mean that we've come to |
|
76 |
* the end of the build process, and there will not be any more entries in |
|
77 |
* the list. |
|
30374 | 78 |
* |
2 | 79 |
* @see sun.security.provider.certpath.BuildStep |
80 |
* @see sun.security.provider.certpath.Vertex |
|
30374 | 81 |
* |
2 | 82 |
* @author seth proctor |
83 |
* @since 1.4 |
|
84 |
*/ |
|
85 |
public class AdjacencyList { |
|
86 |
||
87 |
// the actual set of steps the AdjacencyList represents |
|
88 |
private ArrayList<BuildStep> mStepList; |
|
89 |
||
90 |
// the original list, just for the toString method |
|
91 |
private List<List<Vertex>> mOrigList; |
|
92 |
||
93 |
/** |
|
94 |
* Constructs a new <code>AdjacencyList</code> based on the specified |
|
95 |
* <code>List</code>. See the example above. |
|
96 |
* |
|
97 |
* @param list a <code>List</code> of <code>List</code>s of |
|
98 |
* <code>Vertex</code> objects |
|
99 |
*/ |
|
100 |
public AdjacencyList(List<List<Vertex>> list) { |
|
101 |
mStepList = new ArrayList<BuildStep>(); |
|
102 |
mOrigList = list; |
|
103 |
buildList(list, 0, null); |
|
104 |
} |
|
105 |
||
106 |
/** |
|
107 |
* Gets an <code>Iterator</code> to iterate over the set of |
|
108 |
* <code>BuildStep</code>s in build-order. Any attempts to change |
|
109 |
* the list through the remove method will fail. |
|
110 |
* |
|
111 |
* @return an <code>Iterator</code> over the <code>BuildStep</code>s |
|
112 |
*/ |
|
113 |
public Iterator<BuildStep> iterator() { |
|
114 |
return Collections.unmodifiableList(mStepList).iterator(); |
|
115 |
} |
|
116 |
||
117 |
/** |
|
118 |
* Recursive, private method which actually builds the step list from |
|
119 |
* the given adjacency list. <code>Follow</code> is the parent BuildStep |
|
120 |
* that we followed to get here, and if it's null, it means that we're |
|
121 |
* at the start. |
|
122 |
*/ |
|
123 |
private boolean buildList(List<List<Vertex>> theList, int index, |
|
12860
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
124 |
BuildStep follow) { |
2 | 125 |
|
126 |
// Each time this method is called, we're examining a new list |
|
127 |
// from the global list. So, we have to start by getting the list |
|
128 |
// that contains the set of Vertexes we're considering. |
|
129 |
List<Vertex> l = theList.get(index); |
|
130 |
||
12860
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
131 |
// we're interested in the case where all indexes are -1... |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
132 |
boolean allNegOne = true; |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
133 |
// ...and in the case where every entry has a Throwable |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
134 |
boolean allXcps = true; |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
135 |
|
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
136 |
for (Vertex v : l) { |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
137 |
if (v.getIndex() != -1) { |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
138 |
// count an empty list the same as an index of -1...this |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
139 |
// is to patch a bug somewhere in the builder |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
140 |
if (theList.get(v.getIndex()).size() != 0) |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
141 |
allNegOne = false; |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
142 |
} else { |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
143 |
if (v.getThrowable() == null) |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
144 |
allXcps = false; |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
145 |
} |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
146 |
// every entry, regardless of the final use for it, is always |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
147 |
// entered as a possible step before we take any actions |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
148 |
mStepList.add(new BuildStep(v, BuildStep.POSSIBLE)); |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
149 |
} |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
150 |
|
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
151 |
if (allNegOne) { |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
152 |
// There are two cases that we could be looking at here. We |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
153 |
// may need to back up, or the build may have succeeded at |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
154 |
// this point. This is based on whether or not any |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
155 |
// exceptions were found in the list. |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
156 |
if (allXcps) { |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
157 |
// we need to go back...see if this is the last one |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
158 |
if (follow == null) |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
159 |
mStepList.add(new BuildStep(null, BuildStep.FAIL)); |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
160 |
else |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
161 |
mStepList.add(new BuildStep(follow.getVertex(), |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
162 |
BuildStep.BACK)); |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
163 |
|
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
164 |
return false; |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
165 |
} else { |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
166 |
// we succeeded...now the only question is which is the |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
167 |
// successful step? If there's only one entry without |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
168 |
// a throwable, then that's the successful step. Otherwise, |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
169 |
// we'll have to make some guesses... |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
170 |
List<Vertex> possibles = new ArrayList<>(); |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
171 |
for (Vertex v : l) { |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
172 |
if (v.getThrowable() == null) |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
173 |
possibles.add(v); |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
174 |
} |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
175 |
|
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
176 |
if (possibles.size() == 1) { |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
177 |
// real easy...we've found the final Vertex |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
178 |
mStepList.add(new BuildStep(possibles.get(0), |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
179 |
BuildStep.SUCCEED)); |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
180 |
} else { |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
181 |
// ok...at this point, there is more than one Cert |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
182 |
// which might be the succeed step...how do we know |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
183 |
// which it is? I'm going to assume that our builder |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
184 |
// algorithm is good enough to know which is the |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
185 |
// correct one, and put it first...but a FIXME goes |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
186 |
// here anyway, and we should be comparing to the |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
187 |
// target/initiator Cert... |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
188 |
mStepList.add(new BuildStep(possibles.get(0), |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
189 |
BuildStep.SUCCEED)); |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
190 |
} |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
191 |
|
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
192 |
return true; |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
193 |
} |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
194 |
} else { |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
195 |
// There's at least one thing that we can try before we give |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
196 |
// up and go back. Run through the list now, and enter a new |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
197 |
// BuildStep for each path that we try to follow. If none of |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
198 |
// the paths we try produce a successful end, we're going to |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
199 |
// have to back out ourselves. |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
200 |
boolean success = false; |
2 | 201 |
|
202 |
for (Vertex v : l) { |
|
12860
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
203 |
|
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
204 |
// Note that we'll only find a SUCCEED case when we're |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
205 |
// looking at the last possible path, so we don't need to |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
206 |
// consider success in the while loop |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
207 |
|
2 | 208 |
if (v.getIndex() != -1) { |
12860
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
209 |
if (theList.get(v.getIndex()).size() != 0) { |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
210 |
// If the entry we're looking at doesn't have an |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
211 |
// index of -1, and doesn't lead to an empty list, |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
212 |
// then it's something we follow! |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
213 |
BuildStep bs = new BuildStep(v, BuildStep.FOLLOW); |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
214 |
mStepList.add(bs); |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
215 |
success = buildList(theList, v.getIndex(), bs); |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
216 |
} |
2 | 217 |
} |
218 |
} |
|
219 |
||
12860
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
220 |
if (success) { |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
221 |
// We're already finished! |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
222 |
return true; |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
223 |
} else { |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
224 |
// We failed, and we've exhausted all the paths that we |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
225 |
// could take. The only choice is to back ourselves out. |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
226 |
if (follow == null) |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
227 |
mStepList.add(new BuildStep(null, BuildStep.FAIL)); |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
228 |
else |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
229 |
mStepList.add(new BuildStep(follow.getVertex(), |
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
230 |
BuildStep.BACK)); |
2 | 231 |
|
12860
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
232 |
return false; |
2 | 233 |
} |
234 |
} |
|
235 |
} |
|
236 |
||
237 |
/** |
|
238 |
* Prints out a string representation of this AdjacencyList. |
|
239 |
* |
|
240 |
* @return String representation |
|
241 |
*/ |
|
12860
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
242 |
@Override |
2 | 243 |
public String toString() { |
12860
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
244 |
StringBuilder sb = new StringBuilder("[\n"); |
2 | 245 |
|
246 |
int i = 0; |
|
247 |
for (List<Vertex> l : mOrigList) { |
|
12860
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
248 |
sb.append("LinkedList[").append(i++).append("]:\n"); |
2 | 249 |
|
250 |
for (Vertex step : l) { |
|
12860
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
251 |
sb.append(step.toString()).append("\n"); |
2 | 252 |
} |
253 |
} |
|
12860
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
254 |
sb.append("]\n"); |
2 | 255 |
|
12860
9ffbd4e43413
6854712: Revocation checking enhancements (JEP-124)
mullan
parents:
5506
diff
changeset
|
256 |
return sb.toString(); |
2 | 257 |
} |
258 |
} |