From 7f21691e1e0d6f23938144c744a96e52c6ab0099 Mon Sep 17 00:00:00 2001 From: Gerrit Grunwald Date: Thu, 24 May 2018 14:14:31 +0200 Subject: [PATCH] Modified null check --- src/main/java/eu/hansolo/medusa/FGauge.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/eu/hansolo/medusa/FGauge.java b/src/main/java/eu/hansolo/medusa/FGauge.java index e48a363a..cb116830 100644 --- a/src/main/java/eu/hansolo/medusa/FGauge.java +++ b/src/main/java/eu/hansolo/medusa/FGauge.java @@ -72,9 +72,14 @@ public FGauge(final Gauge GAUGE, final GaugeDesign DESIGN, final GaugeBackground gaugeBackground = BACKGROUND; Skin skin = gauge.getSkin(); + /* if (null != skin && gauge.getSkin().getClass() != GaugeSkin.class) { throw new RuntimeException("Please change Skin to GaugeSkin."); } + */ + if (null != skin) { + throw new RuntimeException("Please change Skin to a valid Skin."); + } init(); initGraphics();