diff options
author | David Pursehouse <david.pursehouse@sonymobile.com> | 2016-02-05 11:46:45 +0900 |
---|---|---|
committer | David Pursehouse <david.pursehouse@sonymobile.com> | 2016-02-05 11:46:45 +0900 |
commit | 84ae3f499176f8d0af9473a79f65c67108f047c7 (patch) | |
tree | 81e9234b6a6658f6e17831facff2627d648e6548 /org.eclipse.jgit.pgm/src | |
parent | a82f5c7425e6078f8345b16200a5127742deb437 (diff) | |
download | jgit-84ae3f499176f8d0af9473a79f65c67108f047c7.tar.gz jgit-84ae3f499176f8d0af9473a79f65c67108f047c7.zip |
TextHashFunctions: Fix warnings about variable hiding
The local variables/arguments named 'db' were hiding the member
variable of the same name in the superclass TextBuiltin.
Change-Id: Ic49dcb7cc2a1b3fb46ad78450042c8c8fb464a80
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
Diffstat (limited to 'org.eclipse.jgit.pgm/src')
-rw-r--r-- | org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java index 062f4e7a1f..28d92aeca1 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java @@ -286,25 +286,25 @@ class TextHashFunctions extends TextBuiltin { else rb.findGitDir(dir); - Repository db = rb.build(); + Repository repo = rb.build(); try { - run(db); + run(repo); } finally { - db.close(); + repo.close(); } } } - private void run(Repository db) throws Exception { + private void run(Repository repo) throws Exception { List<Function> all = init(); long fileCnt = 0; long lineCnt = 0; - try (ObjectReader or = db.newObjectReader(); + try (ObjectReader or = repo.newObjectReader(); RevWalk rw = new RevWalk(or); TreeWalk tw = new TreeWalk(or)) { final MutableObjectId id = new MutableObjectId(); - tw.reset(rw.parseTree(db.resolve(Constants.HEAD))); + tw.reset(rw.parseTree(repo.resolve(Constants.HEAD))); tw.setRecursive(true); while (tw.next()) { @@ -341,7 +341,7 @@ class TextHashFunctions extends TextBuiltin { } } - File directory = db.getDirectory(); + File directory = repo.getDirectory(); if (directory != null) { String name = directory.getName(); File parent = directory.getParentFile(); |