diff options
author | Chris Price <chris@puppetlabs.com> | 2015-07-07 12:30:06 +0100 |
---|---|---|
committer | Chris Price <chris@puppetlabs.com> | 2015-07-07 12:34:03 +0100 |
commit | 88168c6d603833a7033af973af0282dc7056d7ef (patch) | |
tree | 2fa2d0a6b4a9c42d4b91639767c8039bccba4396 /org.eclipse.jgit.junit | |
parent | d2fbbc910a8ecc6cec36354b09fc276b5a236543 (diff) | |
download | jgit-88168c6d603833a7033af973af0282dc7056d7ef.tar.gz jgit-88168c6d603833a7033af973af0282dc7056d7ef.zip |
Use local variable in RepositoryTestCase.indexState
There is a signature of the test helper method `indexState`,
in `RepositoryTestCase`, that accepts a `Repository` object
as an argument. However, there was one line of code where
this variable was not being used, and the method was instead
referring to a member variable `db`. I believe this was
probably just an oversight in a previous refactor, and
that the correct behavior is to use the variable from
the argument list. This change also has the benefit
of making it possible to convert this method to a static
method, since it no longer relies on any state from the class.
Bug: 436200
Change-Id: Iac95b046dc5bd0b3756642e241c3637f1fad3609
Signed-off-by: Chris Price <chris@puppetlabs.com>
Diffstat (limited to 'org.eclipse.jgit.junit')
-rw-r--r-- | org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java index 83148d0009..f9eb7b4eac 100644 --- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java +++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java @@ -238,7 +238,7 @@ public abstract class RepositoryTestCase extends LocalDiskRepositoryTestCase { sb.append(", sha1:" + ObjectId.toString(entry.getObjectId())); if (0 != (includedOptions & CONTENT)) { sb.append(", content:" - + new String(db.open(entry.getObjectId(), + + new String(repo.open(entry.getObjectId(), Constants.OBJ_BLOB).getCachedBytes(), "UTF-8")); } if (0 != (includedOptions & ASSUME_UNCHANGED)) |