Quantcast
Channel: Liquibase Forums
Viewing all articles
Browse latest Browse all 2993

[3.6.3] nullpointer on SqlPrecondition.class

$
0
0
There is a way of making a SQL statement in the precondition , which returns a NULL value.
the null value is handled correctly.

In Line 58 of SQL Precondition (ExecutorService) this returns a oResult of NULL 
Null.toString(); issue.
try {
Object oResult = ExecutorService.getInstance().getExecutor(database).queryForObject(new RawSqlStatement(this.getSql().replaceFirst(";$", "")), String.class);
String result = oResult.toString();
if (result == null) {
throw new PreconditionFailedException("No rows returned from SQL Precondition", changeLog, this);
} else {

Please fix in a newer version , this is a blocking change.

Caused by: java.lang.NullPointerException: null
at liquibase.precondition.core.SqlPrecondition.check(SqlPrecondition.java:51)
at liquibase.precondition.core.NotPrecondition.check(NotPrecondition.java:40)
at liquibase.precondition.core.AndPrecondition.check(AndPrecondition.java:45)
at liquibase.precondition.core.PreconditionContainer.check(PreconditionContainer.java:215)
at liquibase.changelog.ChangeSet.execute(ChangeSet.java:516)
... 58 common frames omitted


Viewing all articles
Browse latest Browse all 2993

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>