summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@gmail.com>2017-08-31 20:29:00 +0900
committerDavid Pursehouse <david.pursehouse@gmail.com>2017-08-31 21:40:10 +0900
commit9c1fcf6ad7eb1378c39bfcff930ff468bd668d09 (patch)
treea1aefbf15e631bea6ce398dd2572c5b31f999c15
parentf8c2067410f23910c6a15b2da4f04403e490d5f2 (diff)
downloadjgit-9c1fcf6ad7eb1378c39bfcff930ff468bd668d09.tar.gz
jgit-9c1fcf6ad7eb1378c39bfcff930ff468bd668d09.zip
FsckPackParser: Fix warnings about variable hiding
Change-Id: Id1ada1cedfad5671e79df303c6dbcb6017b777ce Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/fsck/FsckPackParser.java18
1 files 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 {