Skip to content

Commit fb4d3db

Browse files
authored
Merge pull request #984 from hazendaz/tests
More test cleanup
2 parents 0f9528f + b625cae commit fb4d3db

File tree

4 files changed

+12
-3
lines changed

4 files changed

+12
-3
lines changed

src/test/java/org/mybatis/spring/asyncsynchronization/AsyncAfterCompletionHelper.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,8 @@ public Object invoke(final Object proxy, final Method method, final Object[] arg
6666
thread.join();
6767
if (exceptionSet.isEmpty()) {
6868
return retValSet.iterator().next();
69-
} else {
70-
throw exceptionSet.iterator().next();
7169
}
70+
throw exceptionSet.iterator().next();
7271
}
7372

7473
}

src/test/java/org/mybatis/spring/batch/MyBatisCursorItemReaderTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,17 @@ private List<Object> getFoos() {
9090
return Arrays.asList(new Foo("foo1"), new Foo("foo2"), new Foo("foo3"));
9191
}
9292

93+
// Note: Do not cleanup this 'foo' class
9394
private static class Foo {
9495
private final String name;
9596

9697
Foo(String name) {
9798
this.name = name;
9899
}
100+
101+
public String getName() {
102+
return this.name;
103+
}
99104
}
100105

101106
}

src/test/java/org/mybatis/spring/batch/builder/MyBatisBatchItemWriterBuilderTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,12 +176,17 @@ private Chunk<Foo> getFoos() {
176176
return Chunk.of(new Foo("foo1"), new Foo("foo2"), new Foo("foo3"));
177177
}
178178

179+
// Note: Do not cleanup this 'foo' class
179180
private static class Foo {
180181
private final String name;
181182

182183
Foo(String name) {
183184
this.name = name;
184185
}
186+
187+
public String getName() {
188+
return this.name;
189+
}
185190
}
186191

187192
}

src/test/java/org/mybatis/spring/submitted/xa/UserServiceImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public void saveWithFailure(User user) {
4444

4545
@Override
4646
public boolean checkUserExists(int id) {
47-
if ((userMapperMaster.select(id) != null) || (userMapperSlave.select(id) != null)) {
47+
if (userMapperMaster.select(id) != null || userMapperSlave.select(id) != null) {
4848
return true;
4949
}
5050
return false;

0 commit comments

Comments
 (0)