Avoid star imports and add missing braces (#10521)

Fixes the following SAT findings:

* AvoidStarImportCheck (125)
* NeedBracesCheck (39)

Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
Wouter Born
2021-04-15 16:12:05 +02:00
committed by GitHub
parent e24d43aecb
commit 0c36650179
110 changed files with 793 additions and 217 deletions

View File

@@ -311,7 +311,8 @@ public class VDRHandler extends BaseThingHandler {
*/
private void stopRefreshThread(boolean force) {
ScheduledFuture<?> refreshThread = refreshThreadFuture;
if (refreshThread != null)
if (refreshThread != null) {
refreshThread.cancel(force);
}
}
}

View File

@@ -101,10 +101,12 @@ public class SVDRPClientImpl implements SVDRPClient {
} catch (IOException e) {
// cleanup after timeout
try {
if (localOut != null)
if (localOut != null) {
localOut.close();
if (localIn != null)
}
if (localIn != null) {
localIn.close();
}
localSocket.close();
} catch (IOException ex) {
}