Rework more commons-lang usages (#10314)
* Reworks many commons-lang usages to use standard Java * Updates all remaining commons.lang imports to commons.lang3 Related to openhab/openhab-addons#7722 Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
@@ -25,7 +25,6 @@ import java.net.UnknownHostException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.openhab.binding.pulseaudio.internal.cli.Parser;
|
||||
import org.openhab.binding.pulseaudio.internal.items.AbstractAudioDeviceConfig;
|
||||
import org.openhab.binding.pulseaudio.internal.items.AbstractAudioDeviceConfig.State;
|
||||
@@ -442,7 +441,7 @@ public class PulseaudioClient {
|
||||
sendRawCommand(CMD_UNLOAD_MODULE + " " + combinedSink.getModule().getId());
|
||||
// 2. add new combined-sink with same name and all slaves
|
||||
sendRawCommand(CMD_LOAD_MODULE + " " + MODULE_COMBINE_SINK + " sink_name=" + combinedSink.getPaName()
|
||||
+ " slaves=" + StringUtils.join(slaves, ","));
|
||||
+ " slaves=" + String.join(",", slaves));
|
||||
// 3. update internal data structure because the combined sink has a new number + other slaves
|
||||
update();
|
||||
}
|
||||
@@ -533,7 +532,7 @@ public class PulseaudioClient {
|
||||
}
|
||||
// add new combined-sink with same name and all slaves
|
||||
sendRawCommand(CMD_LOAD_MODULE + " " + MODULE_COMBINE_SINK + " sink_name=" + combinedSinkName + " slaves="
|
||||
+ StringUtils.join(slaves, ","));
|
||||
+ String.join(",", slaves));
|
||||
// update internal data structure because the combined sink is new
|
||||
update();
|
||||
}
|
||||
|
||||
@@ -23,7 +23,6 @@ import java.util.concurrent.TimeUnit;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.openhab.binding.pulseaudio.internal.items.AbstractAudioDeviceConfig;
|
||||
import org.openhab.binding.pulseaudio.internal.items.Sink;
|
||||
import org.openhab.binding.pulseaudio.internal.items.SinkInput;
|
||||
@@ -244,8 +243,7 @@ public class PulseaudioHandler extends BaseThingHandler implements DeviceStatusL
|
||||
: new StringType("-"));
|
||||
}
|
||||
if (device instanceof Sink && ((Sink) device).isCombinedSink()) {
|
||||
updateState(SLAVES_CHANNEL,
|
||||
new StringType(StringUtils.join(((Sink) device).getCombinedSinkNames(), ",")));
|
||||
updateState(SLAVES_CHANNEL, new StringType(String.join(",", ((Sink) device).getCombinedSinkNames())));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user