Skip to content

Commit 27f34bd

Browse files
authored
Merge pull request #1662 from paopaofish/master
Remove several redundant operations
2 parents 3400192 + 338e3d5 commit 27f34bd

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

src/main/java/org/apache/ibatis/mapping/ResultMapping.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -262,11 +262,7 @@ public boolean equals(Object o) {
262262

263263
ResultMapping that = (ResultMapping) o;
264264

265-
if (property == null || !property.equals(that.property)) {
266-
return false;
267-
}
268-
269-
return true;
265+
return property != null && property.equals(that.property);
270266
}
271267

272268
@Override

src/main/java/org/apache/ibatis/mapping/SqlCommandType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@
1919
* @author Clinton Begin
2020
*/
2121
public enum SqlCommandType {
22-
UNKNOWN, INSERT, UPDATE, DELETE, SELECT, FLUSH;
22+
UNKNOWN, INSERT, UPDATE, DELETE, SELECT, FLUSH
2323
}

src/main/java/org/apache/ibatis/session/defaults/DefaultSqlSession.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ public void close() {
269269
}
270270

271271
private void closeCursors() {
272-
if (cursorList != null && cursorList.size() != 0) {
272+
if (cursorList != null && !cursorList.isEmpty()) {
273273
for (Cursor<?> cursor : cursorList) {
274274
try {
275275
cursor.close();

0 commit comments

Comments
 (0)