ibatis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cbe...@apache.org
Subject svn commit: r740592 - in /ibatis/trunk/java/ibatis-2/ibatis-2-core/src/com/ibatis/sqlmap/engine/mapping/sql: SqlText.java stat/StaticSql.java
Date Wed, 04 Feb 2009 03:30:23 GMT
Author: cbegin
Date: Wed Feb  4 03:30:22 2009
New Revision: 740592

URL: http://svn.apache.org/viewvc?rev=740592&view=rev
Log:
Undo removal of linebreaks, as it was not a problem.

Modified:
    ibatis/trunk/java/ibatis-2/ibatis-2-core/src/com/ibatis/sqlmap/engine/mapping/sql/SqlText.java
    ibatis/trunk/java/ibatis-2/ibatis-2-core/src/com/ibatis/sqlmap/engine/mapping/sql/stat/StaticSql.java

Modified: ibatis/trunk/java/ibatis-2/ibatis-2-core/src/com/ibatis/sqlmap/engine/mapping/sql/SqlText.java
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-2/ibatis-2-core/src/com/ibatis/sqlmap/engine/mapping/sql/SqlText.java?rev=740592&r1=740591&r2=740592&view=diff
==============================================================================
--- ibatis/trunk/java/ibatis-2/ibatis-2-core/src/com/ibatis/sqlmap/engine/mapping/sql/SqlText.java
(original)
+++ ibatis/trunk/java/ibatis-2/ibatis-2-core/src/com/ibatis/sqlmap/engine/mapping/sql/SqlText.java
Wed Feb  4 03:30:22 2009
@@ -30,8 +30,8 @@
   }
 
   public void setText(String text) {
-    this.text = text;
-    this.isWhiteSpace = false;
+    this.text = text.replace('\r', ' ').replace('\n', ' ').replace('\t', ' ');
+    this.isWhiteSpace = text.trim().length() == 0;
   }
 
   public boolean isWhiteSpace() {

Modified: ibatis/trunk/java/ibatis-2/ibatis-2-core/src/com/ibatis/sqlmap/engine/mapping/sql/stat/StaticSql.java
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-2/ibatis-2-core/src/com/ibatis/sqlmap/engine/mapping/sql/stat/StaticSql.java?rev=740592&r1=740591&r2=740592&view=diff
==============================================================================
--- ibatis/trunk/java/ibatis-2/ibatis-2-core/src/com/ibatis/sqlmap/engine/mapping/sql/stat/StaticSql.java
(original)
+++ ibatis/trunk/java/ibatis-2/ibatis-2-core/src/com/ibatis/sqlmap/engine/mapping/sql/stat/StaticSql.java
Wed Feb  4 03:30:22 2009
@@ -25,7 +25,7 @@
   private String sqlStatement;
 
   public StaticSql(String sqlStatement) {
-    this.sqlStatement = sqlStatement;
+    this.sqlStatement = sqlStatement.replace('\r', ' ').replace('\n', ' ');
   }
 
   public String getSql(StatementScope statementScope, Object parameterObject) {



Mime
View raw message