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:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user