DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10719>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10719 Files processed under SQL task are hacked ------- Additional Comments From [EMAIL PROTECTED] 2002-07-27 13:21 ------- can be make somewhat cleaner like this (not sure it works, this is just the idea from the top of my head) if we don't care about comments: StringBuffer sqlBuffer = new StringBuffer(128); String line = null; BufferedReader in = new BufferedReader(reader); while ((line = in.readLine()) != null) { line = project.replaceProperties(line); // add the untrimmed line to the sql statement sqlBuffer.append(" ").append(line).append("\n"); // create a trimmed line for comparisons line = line.trim(); // skip comments if (isComment(line)) { continue; } if (isDelimited(line)) { // trim the final sql to remove any whitespace after the delimiter String sql = sqlBuffer.toString().trim(); log("SQL: '" + sql + "'", Project.MSG_VERBOSE); sql = sql.substring(0, sql.length() - delimiter.length()); execSQL(sql, out); // reset for the next statement... sqlBuffer = new StringBuffer(128); } } // Catch any statements not followed by a delimiter String sql = sqlBuffer.toString().trim(); log("SQL: '" + sql + "'", Project.MSG_VERBOSE); execSQL(sql, out); } -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
