NullPointerException in LiquibaseUtil::getBuildInfo when manifest file does not contain attribute 'Bundle-Version'

Description

I experience this NullPointerException in each database update run after upgrade from 3.7.0 to 3.8.0:

The new implementation of LiquibaseUtil::getBuildInfo now retrieves the build version out of the manifest file.
I use shadowjar (https://github.com/johnrengelman) to create a single jar of my application, but this jar file has its own manifest file which does not contain the desired attribute 'Bundle-Version', hence the line buildInfoValue = attr.getValue(manifestId); assigns null to buildInfoValue which a few lines later causes the NPE.
My suggestion would be to check if the manifest contains the attribute 'Bundle-Version' before assigning the retrieved value to buildInfoValue. Then the code will fallback to retrieve the build version from buildinfo.properties.
It would be nice to get this fixed in the next patch release.

Environment

OpenJDK 11.0.3, Liquibase 3.8.0

Status

Assignee

Unassigned

Reporter

Marco Perazzo

Labels

None

Components

Affects versions

Priority

Major
Configure