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:
@@ -50,11 +50,7 @@ public class YIOremoteDockActions implements ThingActions {
|
||||
}
|
||||
}
|
||||
|
||||
public static void sendIRCode(@Nullable ThingActions actions, @Nullable String irCode) {
|
||||
if (actions instanceof YIOremoteDockActions) {
|
||||
((YIOremoteDockActions) actions).sendIRCode(irCode);
|
||||
} else {
|
||||
throw new IllegalArgumentException("Instance is not an YIOremoteDockActions class.");
|
||||
}
|
||||
public static void sendIRCode(ThingActions actions, @Nullable String irCode) {
|
||||
((YIOremoteDockActions) actions).sendIRCode(irCode);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user