这是indexloc提供的服务,不要输入任何密码
Skip to content
This repository was archived by the owner on May 17, 2021. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import org.apache.commons.lang.StringEscapeUtils;
import org.openhab.binding.tcp.AbstractDatagramChannelBinding;
import org.openhab.binding.tcp.Direction;
import org.openhab.binding.tcp.internal.TCPActivator;
Expand All @@ -40,7 +41,7 @@
* text based status messages.
*
* @author Karel Goderis
* @since 1.1.0
* @author Helmut Lehmeyer
*/
public class UDPBinding extends AbstractDatagramChannelBinding<UDPBindingProvider> implements ManagedService {

Expand Down Expand Up @@ -117,8 +118,8 @@ protected boolean internalReceiveChanneledCommand(String itemName, Command comma
if (newState != null) {
eventPublisher.postUpdate(itemName, newState);
} else {
logger.warn("Cannot parse transformed input {} to match command {} on item {}",
transformedResponse, command, itemName);
logger.warn("Cannot parse transformed input {} to match command {} on item {}", transformedResponse,
command, itemName);
}

return false;
Expand Down Expand Up @@ -202,22 +203,14 @@ public void updated(Dictionary config) throws ConfigurationException {

String preambleString = Objects.toString(config.get("preamble"), null);
if (isNotBlank(preambleString)) {
try {
preAmble = preambleString.replaceAll("\\\\", "\\");
} catch (Exception e) {
preAmble = preambleString;
}
preAmble = StringEscapeUtils.unescapeJava(preambleString);
} else {
logger.info("The preamble for all write operations will be set to the default value of {}", preAmble);
}

String postambleString = Objects.toString(config.get("postamble"), null);
if (isNotBlank(postambleString)) {
try {
postAmble = postambleString.replaceAll("\\\\", "\\");
} catch (Exception e) {
postAmble = postambleString;
}
postAmble = StringEscapeUtils.unescapeJava(postambleString);
} else {
logger.info("The postamble for all write operations will be set to the default value of {}", postAmble);
}
Expand Down