From e9107e853f290677eab844ac8d09db0891bdd20e Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Tue, 18 Oct 2016 13:43:41 +0900 Subject: [PATCH] PackOutputStream: Add comment for intentional use of non-short-circuit logic To avoid that people try to "fix" it. Change-Id: Ib4b35e357e4c068a17243ebd2d57b058c54d5834 Signed-off-by: David Pursehouse --- .../eclipse/jgit/internal/storage/pack/PackOutputStream.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackOutputStream.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackOutputStream.java index be1e3d4715..59166e6206 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackOutputStream.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackOutputStream.java @@ -183,7 +183,7 @@ public final class PackOutputStream extends OutputStream { public final void writeHeader(ObjectToPack otp, long rawLength) throws IOException { ObjectToPack b = otp.getDeltaBase(); - if (b != null && (b.isWritten() & ofsDelta)) { + if (b != null && (b.isWritten() & ofsDelta)) { // Non-short-circuit logic is intentional int n = objectHeader(rawLength, OBJ_OFS_DELTA, headerBuffer); n = ofsDelta(count - b.getOffset(), headerBuffer, n); write(headerBuffer, 0, n); -- 2.39.5