From 96dce63fd9b05f97501e463c65398573107f8bd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8E=E6=88=96=E9=9D=9E?= <1016771049@qq.com> Date: Tue, 27 Sep 2022 10:23:48 +0000 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E8=8E=B7=E5=8F=96jar?= =?UTF-8?q?=E7=9A=84=E7=89=88=E6=9C=AC=E5=8F=B7=E8=BF=9B=E8=A1=8Cbanner?= =?UTF-8?q?=E7=9A=84=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: δΈŽζˆ–ιž <1016771049@qq.com> --- .../src/main/java/com/yomahub/liteflow/util/LOGOPrinter.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/liteflow-core/src/main/java/com/yomahub/liteflow/util/LOGOPrinter.java b/liteflow-core/src/main/java/com/yomahub/liteflow/util/LOGOPrinter.java index 514af023f..50f4ea2de 100644 --- a/liteflow-core/src/main/java/com/yomahub/liteflow/util/LOGOPrinter.java +++ b/liteflow-core/src/main/java/com/yomahub/liteflow/util/LOGOPrinter.java @@ -31,7 +31,8 @@ public class LOGOPrinter { } private static String getVersion(){ - Package pkg = LOGOPrinter.class.getPackage(); - return (pkg != null) ? pkg.getImplementationVersion() : "DEV"; + return Optional.ofNullable(LOGOPrinter.class.getPackage()) + .map(Package::getImplementationVersion) + .orElse("DEV"); } }