return EMPTY;
if (isBinary())
return BINARY;
AbbreviatedObjectId id = entry.getId(side);
if (!id.isComplete()) {
Collection<ObjectId> ids = reader.resolve(id);
if (ids.size() == 1) {
id = AbbreviatedObjectId.fromObjectId(ids.iterator().next());
switch (side) {
case OLD:
entry.oldId = id;
break;
case NEW:
entry.newId = id;
break;
}
} else if (ids.size() == 0)
throw new MissingObjectException(id, Constants.OBJ_BLOB);
else
throw new AmbiguousObjectException(id, ids);
}
try {
ObjectLoader ldr = source.open(side, entry);
return ldr.getBytes(binaryFileThreshold);
} catch (LargeObjectException.ExceedsLimit overLimit) {
return BINARY;
} catch (LargeObjectException.ExceedsByteArrayLimit overLimit) {
return BINARY;
} catch (LargeObjectException.OutOfMemory tooBig) {
return BINARY;
} catch (LargeObjectException tooBig) {
tooBig.setObjectId(id.toObjectId());
throw tooBig;
}
}