CustomChangeWrapper executes twice.

Liquibase 2.0-rc2

—CustomChangeWrapper executes twice during update:
1 execution because of AbstractChange.warn:

    at liquibase.change.custom.CustomChangeWrapper.generateStatements(CustomChangeWrapper.java:104) at liquibase.change.AbstractChange.warn(AbstractChange.java:77) at liquibase.changelog.visitor.ValidatingVisitor.visit(ValidatingVisitor.java:75) at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:39) at liquibase.changelog.DatabaseChangeLog.validate(DatabaseChangeLog.java:130) at liquibase.Liquibase.update(Liquibase.java:106)

2 execution is actual update:

    at liquibase.change.custom.CustomChangeWrapper.generateStatements(CustomChangeWrapper.java:104) at liquibase.database.AbstractDatabase.executeStatements(AbstractDatabase.java:945) at liquibase.changelog.ChangeSet.execute(ChangeSet.java:252) at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:27) at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:39) at liquibase.Liquibase.update(Liquibase.java:112)

—customChange from update part of changeset is executed during rollback if AbstractChange.warn is called:

    at liquibase.change.custom.CustomChangeWrapper.generateStatements(CustomChangeWrapper.java:104) at liquibase.change.AbstractChange.warn(AbstractChange.java:77) at liquibase.changelog.visitor.ValidatingVisitor.visit(ValidatingVisitor.java:75) at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:39) at liquibase.changelog.DatabaseChangeLog.validate(DatabaseChangeLog.java:130) at liquibase.Liquibase.rollback(Liquibase.java:234)

I filed a bug http://liquibase.jira.com/browse/CORE-678

I see your bug.  Thanks for creating it.

Nathan