diff --git a/src/main/java/org/openhab/automation/jrule/internal/handler/JRuleHandler.java b/src/main/java/org/openhab/automation/jrule/internal/handler/JRuleHandler.java index 7bb68639..aecbcde0 100644 --- a/src/main/java/org/openhab/automation/jrule/internal/handler/JRuleHandler.java +++ b/src/main/java/org/openhab/automation/jrule/internal/handler/JRuleHandler.java @@ -282,9 +282,7 @@ private void createRuleInstances() { cls.getDeclaredConstructor().newInstance(); logger.info("Instantiated JRuleItems class"); } catch (ClassNotFoundException | IllegalAccessException | NoSuchMethodException | InstantiationException - | InvocationTargetException e) { - logger.error("Could not instantiate JRuleItems file", e); - } catch (Error e) { + | InvocationTargetException | Error e) { logger.error("Could not instantiate JRuleItems file", e); } @@ -293,11 +291,9 @@ private void createRuleInstances() { Class cls = Class.forName(config.getGeneratedThingPackage() + ".JRuleThings", true, loader); cls.getDeclaredConstructor().newInstance(); logger.info("Instantiated JRuleThings class"); - } catch (ClassNotFoundException | IllegalAccessException | NoSuchMethodException | InstantiationException - | InvocationTargetException e) { + } catch (ClassNotFoundException | IllegalAccessException | NoSuchMethodException | InstantiationException | + InvocationTargetException | Error e) { logger.error("Could not instantiate JRuleThings file", e); - } catch (Error error) { - logger.error("Could not instantiate JRuleThings file", error); } // Reload Actions class - this will also instantiate all actions @@ -305,11 +301,9 @@ private void createRuleInstances() { Class cls = Class.forName(config.getGeneratedActionPackage() + ".JRuleActions", true, loader); cls.getDeclaredConstructor().newInstance(); logger.info("Instantiated JRuleActions class"); - } catch (ClassNotFoundException | IllegalAccessException | NoSuchMethodException | InstantiationException - | InvocationTargetException e) { + } catch (ClassNotFoundException | IllegalAccessException | NoSuchMethodException | InstantiationException | + InvocationTargetException | Error e) { logger.error("Could not instantiate JRuleActions file", e); - } catch (Error error) { - logger.error("Could not instantiate JRuleActions file", error); } // Load rules that refer to the items