Skip to content

Commit 5945ee9

Browse files
committed
Trivial optimization.
1 parent bae02af commit 5945ee9

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/main/java/org/apache/ibatis/scripting/xmltags/ForEachSqlNode.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,10 @@ public boolean apply(DynamicContext context) {
6161
int i = 0;
6262
for (Object o : iterable) {
6363
DynamicContext oldContext = context;
64-
if (first) {
64+
if (first || separator == null) {
6565
context = new PrefixedContext(context, "");
66-
} else if (separator != null) {
67-
context = new PrefixedContext(context, separator);
6866
} else {
69-
context = new PrefixedContext(context, "");
67+
context = new PrefixedContext(context, separator);
7068
}
7169
int uniqueNumber = context.getUniqueNumber();
7270
// Issue #709

0 commit comments

Comments
 (0)