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

@@ -46,10 +46,12 @@ public class DiscoveryRawResponseDTO {
@Override
public boolean equals(Object o) {
if (this == o)
if (this == o) {
return true;
if (o == null || getClass() != o.getClass())
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DiscoveryRawResponseDTO that = (DiscoveryRawResponseDTO) o;
return response == that.response && data.equals(that.data) && Objects.equals(ipAddress, that.ipAddress);
}

View File

@@ -76,10 +76,12 @@ public class DiscoveryResponseDTO {
@Override
public boolean equals(Object o) {
if (this == o)
if (this == o) {
return true;
if (o == null || getClass() != o.getClass())
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DiscoveryResponseDTO that = (DiscoveryResponseDTO) o;
return serialNumber.equals(that.serialNumber) && regId.equals(that.regId) && sak.equals(that.sak)
&& name.equals(that.name) && macAddress.equals(that.macAddress) && version.equals(that.version);

View File

@@ -38,10 +38,12 @@ public class SwitchResponseDTO {
@Override
public boolean equals(Object o) {
if (this == o)
if (this == o) {
return true;
if (o == null || getClass() != o.getClass())
}
if (o == null || getClass() != o.getClass()) {
return false;
}
SwitchResponseDTO that = (SwitchResponseDTO) o;
return response == that.response && code == that.code;
}

View File

@@ -38,10 +38,12 @@ public class UdpResponseDTO {
@Override
public boolean equals(Object o) {
if (this == o)
if (this == o) {
return true;
if (o == null || getClass() != o.getClass())
}
if (o == null || getClass() != o.getClass()) {
return false;
}
UdpResponseDTO that = (UdpResponseDTO) o;
return answer.equals(that.answer) && ipAddress.equals(that.ipAddress);
}