NPE in changeSetExecuted precondition in changelog-level preconditions

Description

From http://forum.liquibase.org/topic/liquibase-3-0-2-nullpointerexception-and-logging-request

I'm converting an existing set of changeset files over to use liquibase 3.0.2 from version 2.0.0. I've updated the schema versions, but when running one of my changesets now, I'm receiving the following NPE:

...
DEBUG 7/23/13 3:18 PM:liquibase: Executing UPDATE database command: UPDATE ntdm.databasechangelogloc
k SET LOCKED = FALSE, LOCKEDBY = NULL, LOCKGRANTED = NULL WHERE ID = 1
INFO 7/23/13 3:18 PM:liquibase: Successfully released change log lock
Liquibase update Failed: Unknown Reason
SEVERE 7/23/13 3:18 PM:liquibase: Unknown Reason
java.lang.NullPointerException
at liquibase.precondition.core.ChangeSetExecutedPrecondition.check(ChangeSetExecutedPrecondi
tion.java:52)
at liquibase.precondition.core.AndPrecondition.check(AndPrecondition.java:34)
at liquibase.precondition.core.PreconditionContainer.check(PreconditionContainer.java:199)
at liquibase.changelog.visitor.ValidatingVisitor.validate(ValidatingVisitor.java:52)
at liquibase.changelog.DatabaseChangeLog.validate(DatabaseChangeLog.java:143)
at liquibase.Liquibase.update(Liquibase.java:132)
at liquibase.integration.commandline.Main.doMigration(Main.java:848)
at liquibase.integration.commandline.Main.main(Main.java:138)

The lock is released correctly in the databasechangeloglock table. This is on Postgres 9.2. All changesets previously ran correctly under 2.0 (no changes to content, except for the schema version).

Environment

When a changeSetExecuted precondition is used outside a changeSet

Reporter

Nathan Voxland

Fix versions

Affects versions

Priority

Major
Configure