This commit is contained in:
René Pfeuffer
2018-11-08 14:39:30 +01:00
parent 8d057f7745
commit 97d158ab35
2 changed files with 3 additions and 3 deletions

View File

@@ -73,7 +73,7 @@ public class GitMergeCommand extends AbstractGitCommand implements MergeCommand
} }
private MergeCommandResult merge() throws IOException { private MergeCommandResult merge() throws IOException {
createClone(); checkOutTargetBranch();
MergeResult result = doMergeInClone(); MergeResult result = doMergeInClone();
if (result.getMergeStatus().isSuccessful()) { if (result.getMergeStatus().isSuccessful()) {
doCommit(); doCommit();
@@ -84,7 +84,7 @@ public class GitMergeCommand extends AbstractGitCommand implements MergeCommand
} }
} }
private void createClone() { private void checkOutTargetBranch() {
try { try {
clone.checkout().setName(target).call(); clone.checkout().setName(target).call();
} catch (GitAPIException e) { } catch (GitAPIException e) {

View File

@@ -10,7 +10,7 @@ import static org.mockito.Mockito.verify;
public class CloseableWrapperTest { public class CloseableWrapperTest {
@Test @Test
public void x() { public void shouldExecuteGivenMethodAtClose() {
Consumer<String> wrapped = new Consumer<String>() { Consumer<String> wrapped = new Consumer<String>() {
// no this cannot be replaced with a lambda because otherwise we could not use Mockito#spy // no this cannot be replaced with a lambda because otherwise we could not use Mockito#spy
@Override @Override