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:
@@ -57,11 +57,7 @@ public class NetworkActions implements ThingActions {
|
||||
}
|
||||
}
|
||||
|
||||
public static void sendWakeOnLanPacket(@Nullable ThingActions actions) {
|
||||
if (actions instanceof NetworkActions) {
|
||||
((NetworkActions) actions).sendWakeOnLanPacket();
|
||||
} else {
|
||||
throw new IllegalArgumentException("Actions is not an instance of NetworkActions");
|
||||
}
|
||||
public static void sendWakeOnLanPacket(ThingActions actions) {
|
||||
((NetworkActions) actions).sendWakeOnLanPacket();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user