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

Use fields directly for simplicity

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