From 2a50a475c329a1dcfea13bff0799537db5d969d7 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 15 May 2024 17:00:38 +0200 Subject: Fix NPE --- src/main/java/org/openslx/util/AppUtil.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/openslx/util/AppUtil.java b/src/main/java/org/openslx/util/AppUtil.java index 340dc21..9a1e039 100644 --- a/src/main/java/org/openslx/util/AppUtil.java +++ b/src/main/java/org/openslx/util/AppUtil.java @@ -59,7 +59,9 @@ public class AppUtil jarFileStream = AppUtil.class.getProtectionDomain().getCodeSource().getLocation().openStream(); jarStream = new JarInputStream( jarFileStream ); final Manifest mf = jarStream.getManifest(); - manifestAttributes = mf.getMainAttributes(); + if ( mf != null ) { + manifestAttributes = mf.getMainAttributes(); + } } catch ( Exception e ) { LOGGER.warn( "Cannot read jar/manifest attributes", e ); } finally { -- cgit v1.2.3-55-g7522