Fix SAT warnings (#14202)
* Fix SAT warnings - checkstyle.ModifierOrderCheck - checkstyle.OneStatementPerLineCheck - checkstyle.NeedBracesCheck - PMD.UseStandardCharsets - PMD.UseCollectionIsEmpty - PMD.UnusedLocalVariable - PMD.SimplifyBooleanReturns where reasonable, suppress where readability is better without change - PMD.SimplifyBooleanExpressions * Include StandardCharsets Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
This commit is contained in:
@@ -131,8 +131,9 @@ public abstract class RpcClient<T> {
|
||||
* Disposes the client.
|
||||
*/
|
||||
public void dispose() {
|
||||
if (future != null)
|
||||
if (future != null) {
|
||||
future.cancel(true);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -335,7 +335,7 @@ public class HomematicTypeGeneratorImpl implements HomematicTypeGenerator {
|
||||
ParameterOption defaultOption = options.get(offset);
|
||||
logger.trace("Changing default option to {} (offset {})", defaultOption, offset);
|
||||
builder.withDefault(defaultOption.getValue());
|
||||
} else if (options.size() > 0) {
|
||||
} else if (!options.isEmpty()) {
|
||||
ParameterOption defaultOption = options.get(0);
|
||||
logger.trace("Changing default option to {} (first value)", defaultOption);
|
||||
builder.withDefault(defaultOption.getValue());
|
||||
|
||||
Reference in New Issue
Block a user