Commit cddd794a authored by Phillip Webb's avatar Phillip Webb

Polish

parent e753b530
...@@ -182,62 +182,29 @@ public class BuildInfoProperties implements Serializable { ...@@ -182,62 +182,29 @@ public class BuildInfoProperties implements Serializable {
if (this == obj) { if (this == obj) {
return true; return true;
} }
if (obj == null) { if (obj == null || getClass() != obj.getClass()) {
return false;
}
if (getClass() != obj.getClass()) {
return false; return false;
} }
BuildInfoProperties other = (BuildInfoProperties) obj; BuildInfoProperties other = (BuildInfoProperties) obj;
if (this.additionalProperties == null) { boolean result = true;
if (other.additionalProperties != null) { result = result
return false; && nullSafeEquals(this.additionalProperties, other.additionalProperties);
} result = result && nullSafeEquals(this.artifact, other.artifact);
} result = result && nullSafeEquals(this.group, other.group);
else if (!this.additionalProperties.equals(other.additionalProperties)) { result = result && nullSafeEquals(this.name, other.name);
return false; result = result && nullSafeEquals(this.version, other.version);
} result = result && nullSafeEquals(this.time, other.time);
if (this.artifact == null) { return result;
if (other.artifact != null) {
return false;
}
}
else if (!this.artifact.equals(other.artifact)) {
return false;
}
if (this.group == null) {
if (other.group != null) {
return false;
}
}
else if (!this.group.equals(other.group)) {
return false;
}
if (this.name == null) {
if (other.name != null) {
return false;
}
}
else if (!this.name.equals(other.name)) {
return false;
}
if (this.version == null) {
if (other.version != null) {
return false;
}
}
else if (!this.version.equals(other.version)) {
return false;
}
if (this.time == null) {
if (other.time != null) {
return false;
} }
private boolean nullSafeEquals(Object o1, Object o2) {
if (o1 == o2) {
return true;
} }
else if (!this.time.equals(other.time)) { if (o1 == null || o2 == null) {
return false; return false;
} }
return true; return (o1.equals(o2));
} }
} }
...@@ -119,7 +119,6 @@ class BootZipCopyAction implements CopyAction { ...@@ -119,7 +119,6 @@ class BootZipCopyAction implements CopyAction {
return () -> true; return () -> true;
} }
@SuppressWarnings("unchecked")
private Spec<FileTreeElement> createExclusionSpec( private Spec<FileTreeElement> createExclusionSpec(
Spec<FileTreeElement> loaderEntries) { Spec<FileTreeElement> loaderEntries) {
return Specs.union(loaderEntries, this.exclusions); return Specs.union(loaderEntries, this.exclusions);
......
...@@ -88,10 +88,7 @@ public class LaunchScriptConfiguration implements Serializable { ...@@ -88,10 +88,7 @@ public class LaunchScriptConfiguration implements Serializable {
if (this == obj) { if (this == obj) {
return true; return true;
} }
if (obj == null) { if (obj == null || getClass() != obj.getClass()) {
return false;
}
if (getClass() != obj.getClass()) {
return false; return false;
} }
LaunchScriptConfiguration other = (LaunchScriptConfiguration) obj; LaunchScriptConfiguration other = (LaunchScriptConfiguration) obj;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment