Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 237228
Collapse All | Expand All

(-)a/org.spearce.jgit/src/org/spearce/jgit/lib/PackIndexV2.java (-7 / +6 lines)
Lines 184-196 class PackIndexV2 extends PackIndex { Link Here
184
	private class EntriesIteratorV2 extends EntriesIterator {
184
	private class EntriesIteratorV2 extends EntriesIterator {
185
		private int levelOne;
185
		private int levelOne;
186
186
187
		private int levelTWo;
187
		private int levelTwo;
188
188
189
		public MutableEntry next() {
189
		public MutableEntry next() {
190
			for (; levelOne < names.length; levelOne++) {
190
			for (; levelOne < names.length; levelOne++) {
191
				if (levelTWo < names[levelOne].length) {
191
				if (levelTwo < names[levelOne].length) {
192
					objectId.fromRaw(names[levelOne], levelTWo);
192
					objectId.fromRaw(names[levelOne], levelTwo);
193
					int arrayIdx = levelTWo / (Constants.OBJECT_ID_LENGTH / 4)
193
					int arrayIdx = levelTwo / (Constants.OBJECT_ID_LENGTH / 4)
194
							* 4;
194
							* 4;
195
					long offset = NB.decodeUInt32(offset32[levelOne], arrayIdx);
195
					long offset = NB.decodeUInt32(offset32[levelOne], arrayIdx);
196
					if ((offset & IS_O64) != 0) {
196
					if ((offset & IS_O64) != 0) {
Lines 199-209 class PackIndexV2 extends PackIndex { Link Here
199
					}
199
					}
200
					objectId.setOffset(offset);
200
					objectId.setOffset(offset);
201
201
202
					levelTWo += Constants.OBJECT_ID_LENGTH / 4;
202
					levelTwo += Constants.OBJECT_ID_LENGTH / 4;
203
					returnedNumber++;
203
					returnedNumber++;
204
					return objectId;
204
					return objectId;
205
				} else {
205
				} else {
206
					levelTWo = 0;
206
					levelTwo = 0;
207
				}
207
				}
208
			}
208
			}
209
			throw new NoSuchElementException();
209
			throw new NoSuchElementException();
210
- 

Return to bug 237228