Unverified 提交 15c00f56 authored 作者: Noel Grandin's avatar Noel Grandin 提交者: GitHub

Merge pull request #724 from prashantbhat/PR-02

Use StringBuilder instead of StringBuffer
......@@ -1201,7 +1201,7 @@ public class Parser {
// build and prepare the targetMatchQuery ready to test each rows
// existence in the target table (using source row to match)
StringBuffer targetMatchQuerySQL = new StringBuffer(
StringBuilder targetMatchQuerySQL = new StringBuilder(
"SELECT _ROWID_ FROM " + command.getTargetTable().getName());
if (command.getTargetTableFilter().getTableAlias() != null) {
targetMatchQuerySQL.append(
......
......@@ -788,7 +788,7 @@ public class TableFilter implements ColumnResolver {
}
}
if (nestedJoin != null) {
StringBuffer buffNested = new StringBuffer();
StringBuilder buffNested = new StringBuilder();
TableFilter n = nestedJoin;
do {
buffNested.append(n.getPlanSQL(n != nestedJoin));
......
......@@ -197,7 +197,7 @@ public class OsgiDataSourceFactory implements DataSourceFactory {
}
// Setting URL
StringBuffer connectionUrl = new StringBuffer();
StringBuilder connectionUrl = new StringBuilder();
if (p.containsKey(DataSourceFactory.JDBC_URL)) {
// Use URL if specified
connectionUrl.append(p.remove(DataSourceFactory.JDBC_URL));
......
......@@ -548,7 +548,7 @@ public class TestGeneralCommonTableQueries extends TestBase {
int rowNdx=0;
while (rs.next()) {
StringBuffer buf = new StringBuffer();
StringBuilder buf = new StringBuilder();
for(int columnIndex = 1; columnIndex <= rs.getMetaData().getColumnCount(); columnIndex++){
buf.append("|"+rs.getString(columnIndex));
}
......
......@@ -305,7 +305,7 @@ public class TestMergeUsing extends TestBase implements Trigger {
+ expectedResultsSQL + " )");
int rowCount = 0;
StringBuffer diffBuffer = new StringBuffer("");
StringBuilder diffBuffer = new StringBuilder("");
while (rs.next()) {
rowCount++;
diffBuffer.append("|");
......@@ -401,7 +401,7 @@ public class TestMergeUsing extends TestBase implements Trigger {
}
private String getCreateTriggerSQL() {
StringBuffer buf = new StringBuffer();
StringBuilder buf = new StringBuilder();
buf.append("CREATE TRIGGER INS_BEFORE " + "BEFORE INSERT ON PARENT "
+ "FOR EACH ROW NOWAIT CALL \"" + getClass().getName() + "\";");
buf.append("CREATE TRIGGER UPD_BEFORE " + "BEFORE UPDATE ON PARENT "
......
......@@ -344,7 +344,7 @@ class ForStatement extends StatementBase {
@Override
public String asString() {
StringBuffer buff = new StringBuffer();
StringBuilder buff = new StringBuilder();
buff.append("for (");
if (iterableType != null) {
Type it = iterable.getType();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论