Rework ThingActions (#8755)
* Remove duplication by making use of default Java generated exceptions * Make ThingActions labels/descriptions more consistent Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
@@ -67,11 +67,7 @@ public class BridgeActions implements ThingActions {
|
||||
}
|
||||
|
||||
// Static method for Rules DSL backward compatibility
|
||||
public static void reboot(@Nullable ThingActions actions) {
|
||||
if (actions instanceof BridgeActions) {
|
||||
((BridgeActions) actions).reboot();
|
||||
} else {
|
||||
throw new IllegalArgumentException("Actions is not an instance of BridgeActions");
|
||||
}
|
||||
public static void reboot(ThingActions actions) {
|
||||
((BridgeActions) actions).reboot();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user