Skip to content

Commit aad75eb

Browse files
committed
Minor correction: boolean can never be null
1 parent 7927dfc commit aad75eb

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/main/java/org/apache/ibatis/builder/MapperBuilderAssistant.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,6 @@ public MappedStatement addMappedStatement(
268268
}
269269

270270
id = applyCurrentNamespace(id, false);
271-
boolean isSelect = sqlCommandType == SqlCommandType.SELECT;
272271

273272
MappedStatement.Builder statementBuilder = new MappedStatement.Builder(configuration, id, sqlSource, sqlCommandType)
274273
.resource(resource)
@@ -284,8 +283,8 @@ public MappedStatement addMappedStatement(
284283
.resultSets(resultSets)
285284
.resultMaps(getStatementResultMaps(resultMap, resultType, id))
286285
.resultSetType(resultSetType)
287-
.flushCacheRequired(valueOrDefault(flushCache, !isSelect))
288-
.useCache(valueOrDefault(useCache, isSelect))
286+
.flushCacheRequired(flushCache)
287+
.useCache(useCache)
289288
.cache(currentCache);
290289

291290
ParameterMap statementParameterMap = getStatementParameterMap(parameterMap, parameterType, id);

0 commit comments

Comments
 (0)