Skip to content

Commit 83b6d28

Browse files
committed
fix compiler warnings
Signed-off-by: Alexander Friese <af944580@googlemail.com>
1 parent 15c91bf commit 83b6d28

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

  • bundles/org.openhab.binding.easee/src/main/java/org/openhab/binding/easee/internal/command

bundles/org.openhab.binding.easee/src/main/java/org/openhab/binding/easee/internal/command/AbstractCommand.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,8 @@ public AbstractCommand(EaseeThingHandler handler, RetryOnFailure retryOnFailure,
128128
@Override
129129
public final void onSuccess(Response response) {
130130
super.onSuccess(response);
131-
if (response != null) {
132-
communicationStatus.setHttpCode(HttpStatus.getCode(response.getStatus()));
133-
logger.debug("HTTP response {}", response.getStatus());
134-
}
131+
communicationStatus.setHttpCode(HttpStatus.getCode(response.getStatus()));
132+
logger.debug("HTTP response {}", response.getStatus());
135133
}
136134

137135
/**
@@ -166,7 +164,8 @@ public final void onFailure(@Nullable Response response, @Nullable Throwable fai
166164
@Override
167165
public void onContent(Response response, ByteBuffer content) {
168166
super.onContent(response, content);
169-
logger.debug("received content, length: {}", getContentAsString().length());
167+
String content = getContentAsString();
168+
logger.debug("received content, length: {}", content != null ? content.length() : 0);
170169
}
171170

172171
/**

0 commit comments

Comments
 (0)