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:
@@ -33,7 +33,7 @@ import com.google.gson.JsonSyntaxException;
|
||||
@NonNullByDefault
|
||||
public class GreeException extends Exception {
|
||||
private static final long serialVersionUID = -2337258558995287405L;
|
||||
private static String EX_NONE = "none";
|
||||
private static final String EX_NONE = "none";
|
||||
|
||||
public GreeException(@Nullable Exception exception) {
|
||||
super(exception);
|
||||
|
||||
@@ -60,7 +60,7 @@ import com.google.gson.JsonSyntaxException;
|
||||
@NonNullByDefault
|
||||
public class GreeAirDevice {
|
||||
private final Logger logger = LoggerFactory.getLogger(GreeAirDevice.class);
|
||||
private final static Gson gson = new Gson();
|
||||
private static final Gson gson = new Gson();
|
||||
private boolean isBound = false;
|
||||
private final InetAddress ipAddress;
|
||||
private int port = 0;
|
||||
@@ -80,7 +80,6 @@ public class GreeAirDevice {
|
||||
}
|
||||
|
||||
public void getDeviceStatus(DatagramSocket clientSocket) throws GreeException {
|
||||
|
||||
if (!isBound) {
|
||||
throw new GreeException("Device not bound");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user