提交 7636d2cc authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Use fields directly for simplicity

上级 9b1bca4c
......@@ -570,9 +570,8 @@ public class AlterTableAlterColumn extends CommandWithColumns {
@Override
public void addColumn(Column column) {
ArrayList<Column> columnsToAdd = this.columnsToAdd;
if (columnsToAdd == null) {
this.columnsToAdd = columnsToAdd = New.arrayList();
columnsToAdd = New.arrayList();
}
columnsToAdd.add(column);
}
......
......@@ -73,7 +73,6 @@ public abstract class CommandWithColumns extends SchemaCommand {
}
protected void createConstraints() {
ArrayList<DefineCommand> constraintCommands = this.constraintCommands;
if (constraintCommands != null) {
for (DefineCommand command : constraintCommands) {
command.setTransactional(transactional);
......@@ -103,9 +102,8 @@ public abstract class CommandWithColumns extends SchemaCommand {
}
private ArrayList<DefineCommand> getConstraintCommands() {
ArrayList<DefineCommand> constraintCommands = this.constraintCommands;
if (constraintCommands == null) {
this.constraintCommands = constraintCommands = New.arrayList();
constraintCommands = New.arrayList();
}
return constraintCommands;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论