-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[DSCAlarm] Bug Fix: DSC Alarm Command 060 Not Working #5108
Conversation
The DSC Alarm command was not working correctly. The binding was erroneously checking for a partition number which is not requirered by this command.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two minor comments that don't need to be changed. Otherwise looks good to me.
logger.error("sendCommand(): Partition number must be a single character string from 1 to 8, it was: " + apiData[0]); | ||
logger.error( | ||
"sendCommand(): Partition number must be a single character string from 1 to 8, it was: " | ||
+ apiData[0]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not strictly necessary since the likelihood of errors being configured to be logged is very high, but this could be changed to use parameterized logging instead of string concatenation.
break; | ||
} | ||
|
||
if (apiData[1] == null || !apiData[1].matches("[1-4]")) { | ||
logger.error("sendCommand(): Output number must be a single character string from 1 to 4, it was: " + apiData[1]); | ||
logger.error("sendCommand(): Output number must be a single character string from 1 to 4, it was: " | ||
+ apiData[1]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not strictly necessary since the likelihood of errors being configured to be logged is very high, but this could be changed to use parameterized logging instead of string concatenation.
Hello John, I took your advise and replaced the string concatenation to the parameterized method. Strange those were the only two like that, the others were the correct way. Thanks. |
* [DSCAlarm] Bug Fix: DSC Alarm Command 060 Not Working The DSC Alarm command was not working correctly. The binding was erroneously checking for a partition number which is not requirered by this command. * Removed String Concatonation in logging statements
Thanks Russell! Also cherry-picked onto the 1.9.x branch. |
The DSC Alarm command was not working correctly. The binding was
erroneously checking for a partition number which is not required by
this command. This has been tested as seen here, and found to be working correctly.
Signed-off by: Russell Stephens rsstephens@gmail.com (github:@RSStephens)