Skip to content

Commit 95b8ec9

Browse files
committed
variable name is modified from minifiySqlEnabled to shrinkWhitespacesInSql. (#1901 (comment))
1 parent dc8b67c commit 95b8ec9

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public SqlSource parse(String originalSql, Class<?> parameterType, Map<String, O
4444
ParameterMappingTokenHandler handler = new ParameterMappingTokenHandler(configuration, parameterType, additionalParameters);
4545
GenericTokenParser parser = new GenericTokenParser("#{", "}", handler);
4646
String sql;
47-
if (configuration.isMinifySqlEnabled()) {
47+
if (configuration.isShrinkWhitespacesInSql()) {
4848
sql = parser.parse(StringParser.removeBreakingWhitespace(originalSql));
4949
} else {
5050
sql = parser.parse(originalSql);

src/main/java/org/apache/ibatis/session/Configuration.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public class Configuration {
113113
protected boolean callSettersOnNulls;
114114
protected boolean useActualParamName = true;
115115
protected boolean returnInstanceForEmptyRow;
116-
protected boolean minifySqlEnabled;
116+
protected boolean shrinkWhitespacesInSql;
117117

118118
protected String logPrefix;
119119
protected Class<? extends Log> logImpl;
@@ -267,12 +267,12 @@ public void setReturnInstanceForEmptyRow(boolean returnEmptyInstance) {
267267
this.returnInstanceForEmptyRow = returnEmptyInstance;
268268
}
269269

270-
public boolean isMinifySqlEnabled() {
271-
return minifySqlEnabled;
270+
public boolean isShrinkWhitespacesInSql() {
271+
return shrinkWhitespacesInSql;
272272
}
273273

274-
public void setMinifySqlEnabled(boolean minifySqlEnabled) {
275-
this.minifySqlEnabled = minifySqlEnabled;
274+
public void setShrinkWhitespacesInSql(boolean shrinkWhitespacesInSql) {
275+
this.shrinkWhitespacesInSql = shrinkWhitespacesInSql;
276276
}
277277

278278
public String getDatabaseId() {

src/test/java/org/apache/ibatis/builder/SqlSourceBuilderTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ void testMinifySqlEnabledIsFalse() {
5353

5454
@Test
5555
void testMinifySqlEnabledIsTrue() {
56-
configuration.setMinifySqlEnabled(true);
56+
configuration.setShrinkWhitespacesInSql(true);
5757
SqlSource sqlSource = sqlSourceBuilder.parse(sqlFromXml, null, null);
5858
BoundSql boundSql = sqlSource.getBoundSql(null);
5959
String actual = boundSql.getSql();

0 commit comments

Comments
 (0)