Commit 7f33d942 authored by Phillip Webb's avatar Phillip Webb

Fix banner NPE when when using the default package

Update ResourceBanner to protect against a null application package.

Fixes gh-2143
parent e24196b8
......@@ -99,8 +99,8 @@ public class ResourceBanner implements Banner {
}
protected String getApplicationVersion(Class<?> sourceClass) {
return (sourceClass == null ? null : sourceClass.getPackage()
.getImplementationVersion());
Package sourcePackage = (sourceClass == null ? null : sourceClass.getPackage());
return (sourcePackage == null ? null : sourcePackage.getImplementationVersion());
}
protected String getBootVersion() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment