From 9c1fcf6ad7eb1378c39bfcff930ff468bd668d09 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Thu, 31 Aug 2017 20:29:00 +0900 Subject: [PATCH] FsckPackParser: Fix warnings about variable hiding Change-Id: Id1ada1cedfad5671e79df303c6dbcb6017b777ce Signed-off-by: David Pursehouse --- .../jgit/internal/fsck/FsckPackParser.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/fsck/FsckPackParser.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/fsck/FsckPackParser.java index 184bf416e0..fa5abaa6d9 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/fsck/FsckPackParser.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/fsck/FsckPackParser.java @@ -219,12 +219,12 @@ public class FsckPackParser extends PackParser { if (bytes == null) { return -1; } - int offset = (int) (channelPosition - block * blockSize); - int bytesToCopy = Math.min(cnt, bytes.length - offset); + int offs = (int) (channelPosition - block * blockSize); + int bytesToCopy = Math.min(cnt, bytes.length - offs); if (bytesToCopy < 1) { return -1; } - System.arraycopy(bytes, offset, dst, pos, bytesToCopy); + System.arraycopy(bytes, offs, dst, pos, bytesToCopy); return bytesToCopy; } @@ -277,13 +277,13 @@ public class FsckPackParser extends PackParser { PackedObjectInfo entry = getObject(i); inPack.add(new ObjFromPack(entry)); - long offset = idx.findOffset(entry); - if (offset == -1) { + long offs = idx.findOffset(entry); + if (offs == -1) { throw new CorruptPackIndexException( MessageFormat.format(JGitText.get().missingObject, entry.getType(), entry.getName()), ErrorType.MISSING_OBJ); - } else if (offset != entry.getOffset()) { + } else if (offs != entry.getOffset()) { throw new CorruptPackIndexException(MessageFormat .format(JGitText.get().mismatchOffset, entry.getName()), ErrorType.MISMATCH_OFFSET); @@ -317,11 +317,11 @@ public class FsckPackParser extends PackParser { * Set the object count for overwriting the expected object count from pack * header. * - * @param expectedObjectCount + * @param objectCount * the actual expected object count. */ - public void overwriteObjectCount(long expectedObjectCount) { - this.expectedObjectCount = expectedObjectCount; + public void overwriteObjectCount(long objectCount) { + this.expectedObjectCount = objectCount; } static class ObjFromPack extends ObjectIdOwnerMap.Entry { -- 2.39.5