byte[] count = getClient().readDeviceProperties(address, ROUTER_OBJECT, PID.FRIENDLY_NAME, 0, 1, false,
OPERATION_TIMEOUT);
if ((count != null) && (toUnsigned(count) == 30)) {
- StringBuffer buf = new StringBuffer(30);
+ StringBuilder buf = new StringBuilder(30);
for (int i = 1; i <= 30; i++) {
Thread.sleep(OPERATION_INTERVAL);
// for some reason, reading more than one character per message fails
*/
package org.openhab.binding.knx.internal.console;
-import java.util.Arrays;
import java.util.List;
import java.util.Map.Entry;
for (KNXBridgeBaseThingHandler bridgeHandler : knxHandlerFactory.getBridges()) {
console.println("KNX bridge \"" + bridgeHandler.getThing().getLabel()
+ "\": group address, type, number of bytes, and number of occurence since last reload of binding:");
- // console.println(handler.getCommandExtensionData().unknownGA().toString());
for (Entry<String, Long> entry : bridgeHandler.getCommandExtensionData().unknownGA().entrySet()) {
console.println(entry.getKey() + " " + entry.getValue());
}
@Override
public List<String> getUsages() {
- return Arrays.asList(
- buildCommandUsage(CMD_LIST_UNKNOWN_GA, "list group addresses which are not configured in openHAB"));
+ return List
+ .of(buildCommandUsage(CMD_LIST_UNKNOWN_GA, "list group addresses which are not configured in openHAB"));
}
@Override
import java.util.Map;
import java.util.TreeMap;
-import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import org.openhab.core.thing.binding.BaseBridgeHandler;
import org.openhab.core.types.Command;
-import tuwien.auto.calimero.IndividualAddress;
import tuwien.auto.calimero.knxnetip.SecureConnection;
-import tuwien.auto.calimero.mgmt.Destination;
import tuwien.auto.calimero.secure.KnxSecureException;
/**
public record CommandExtensionData(Map<String, Long> unknownGA) {
}
- protected ConcurrentHashMap<IndividualAddress, Destination> destinations = new ConcurrentHashMap<>();
private final ScheduledExecutorService knxScheduler = ThreadPoolManager.getScheduledPool("knx");
private final ScheduledExecutorService backgroundScheduler = Executors.newSingleThreadScheduledExecutor();
protected SecureRoutingConfig secureRouting;
* translated)]), empty string for null. May possibly change in further releases.
*/
public String getLocalizedException(final Throwable e) {
- StringBuffer res = new StringBuffer();
+ StringBuilder res = new StringBuilder();
final String exName = e.getClass().getSimpleName();
final String key = "exception." + exName;
final String translatedDescription = KNXTranslationProvider.I18N.get(key);