Skip to content

Commit 403625f

Browse files
committed
[ci] Combine 'if' statement per pmd/sonar
1 parent a105516 commit 403625f

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/main/java/org/apache/ibatis/builder/xml/XMLMapperBuilder.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -426,14 +426,12 @@ private void bindMapperForNamespace() {
426426
} catch (ClassNotFoundException e) {
427427
//ignore, bound type is not required
428428
}
429-
if (boundType != null) {
430-
if (!configuration.hasMapper(boundType)) {
431-
// Spring may not know the real resource name so we set a flag
432-
// to prevent loading again this resource from the mapper interface
433-
// look at MapperAnnotationBuilder#loadXmlResource
434-
configuration.addLoadedResource("namespace:" + namespace);
435-
configuration.addMapper(boundType);
436-
}
429+
if (boundType != null && !configuration.hasMapper(boundType)) {
430+
// Spring may not know the real resource name so we set a flag
431+
// to prevent loading again this resource from the mapper interface
432+
// look at MapperAnnotationBuilder#loadXmlResource
433+
configuration.addLoadedResource("namespace:" + namespace);
434+
configuration.addMapper(boundType);
437435
}
438436
}
439437
}

0 commit comments

Comments
 (0)