Skip to content

Commit

Permalink
Return boolean instead of ack for reloadPlugins and setPluginState
Browse files Browse the repository at this point in the history
  • Loading branch information
moritzvieli committed Dec 9, 2024
1 parent e792f52 commit b5be0b9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions java/src/main/java/ola/OlaClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,10 @@ public PluginListReply getPlugins() {
/**
* Reload the plugins.
*
* @return Acknowledgement.
* @return true when succeeded.
*/
public Ack reloadPlugins() {
return (Ack) callRpcMethod("ReloadPlugins", PluginReloadRequest.newBuilder().build());
public boolean reloadPlugins() {
return callRpcMethod("ReloadPlugins", PluginReloadRequest.newBuilder().build()) != null;
}


Expand Down Expand Up @@ -162,15 +162,15 @@ public PluginStateReply getPluginState(int pluginId) {
*
* @param pluginId number of the plugin for which to change the state
* @param enabled whether the plugin should be enabled or not
* @return Acknowledgement.
* @return true when succeeded.
*/
public Ack setPluginState(int pluginId, boolean enabled) {
public boolean setPluginState(int pluginId, boolean enabled) {
PluginStateChangeRequest request = Ola.PluginStateChangeRequest.newBuilder()
.setPluginId(pluginId)
.setEnabled(enabled)
.build();

return (Ack) callRpcMethod("SetPluginState", request);
return callRpcMethod("SetPluginState", request) != null;
}


Expand Down

0 comments on commit b5be0b9

Please sign in to comment.