Skip to content

Commit 68cd278

Browse files
committed
Add extended error output, fix some syntax
1 parent e1bcd89 commit 68cd278

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main/java/org/openhab/binding/synologysurveillancestation/handler/SynoCameraHandler.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,13 +166,13 @@ public void handleCommand(ChannelUID channelUID, Command command) {
166166
break;
167167
case CHANNEL_MOVEPRESET:
168168
String preset = checkOption(presets, command.toString());
169-
if (preset != "") {
169+
if (!"".equals(preset)) {
170170
apiHandler.getApiPTZ().goPreset(cameraId, preset);
171171
}
172172
break;
173173
case CHANNEL_RUNPATROL:
174174
String patrol = checkOption(patrols, command.toString());
175-
if (patrol != "") {
175+
if (!"".equals(patrol)) {
176176
apiHandler.getApiPTZ().runPatrol(cameraId, patrol);
177177
}
178178
break;
@@ -262,7 +262,7 @@ public void initialize() {
262262
threads.get(SynoApiThread.THREAD_CAMERAEVENT).runOnce();
263263
}
264264

265-
if (toExclude.size() > 0) {
265+
if (!toExclude.isEmpty()) {
266266
ThingBuilder thingBuilder = editThing();
267267
for (String channel : toExclude) {
268268
thingBuilder.withoutChannel(new ChannelUID(getThing().getUID(), channel));
@@ -272,6 +272,7 @@ public void initialize() {
272272
} catch (WebApiException e) {
273273
logger.error("initialize camera: id {} - {}::{}", cameraId, getThing().getLabel(),
274274
getThing().getUID());
275+
logger.error("Full stack trace: ", e);
275276
}
276277

277278
updateStatus(ThingStatus.ONLINE);

0 commit comments

Comments
 (0)