Consistent equals/hashCode style (and related polishing)
This commit is contained in:
@@ -51,13 +51,8 @@ public abstract class JCacheOperationSourcePointcut extends StaticMethodMatcherP
|
||||
|
||||
@Override
|
||||
public boolean equals(@Nullable Object other) {
|
||||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
if (!(other instanceof JCacheOperationSourcePointcut otherPc)) {
|
||||
return false;
|
||||
}
|
||||
return ObjectUtils.nullSafeEquals(getCacheOperationSource(), otherPc.getCacheOperationSource());
|
||||
return (this == other || (other instanceof JCacheOperationSourcePointcut that &&
|
||||
ObjectUtils.nullSafeEquals(getCacheOperationSource(), that.getCacheOperationSource())));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-2023 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -223,20 +223,15 @@ public class SimpleMailMessage implements MailMessage, Serializable {
|
||||
|
||||
@Override
|
||||
public boolean equals(@Nullable Object other) {
|
||||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
if (!(other instanceof SimpleMailMessage otherMessage)) {
|
||||
return false;
|
||||
}
|
||||
return (ObjectUtils.nullSafeEquals(this.from, otherMessage.from) &&
|
||||
ObjectUtils.nullSafeEquals(this.replyTo, otherMessage.replyTo) &&
|
||||
ObjectUtils.nullSafeEquals(this.to, otherMessage.to) &&
|
||||
ObjectUtils.nullSafeEquals(this.cc, otherMessage.cc) &&
|
||||
ObjectUtils.nullSafeEquals(this.bcc, otherMessage.bcc) &&
|
||||
ObjectUtils.nullSafeEquals(this.sentDate, otherMessage.sentDate) &&
|
||||
ObjectUtils.nullSafeEquals(this.subject, otherMessage.subject) &&
|
||||
ObjectUtils.nullSafeEquals(this.text, otherMessage.text));
|
||||
return (this == other || (other instanceof SimpleMailMessage that &&
|
||||
ObjectUtils.nullSafeEquals(this.from, that.from) &&
|
||||
ObjectUtils.nullSafeEquals(this.replyTo, that.replyTo) &&
|
||||
ObjectUtils.nullSafeEquals(this.to, that.to) &&
|
||||
ObjectUtils.nullSafeEquals(this.cc, that.cc) &&
|
||||
ObjectUtils.nullSafeEquals(this.bcc, that.bcc) &&
|
||||
ObjectUtils.nullSafeEquals(this.sentDate, that.sentDate) &&
|
||||
ObjectUtils.nullSafeEquals(this.subject, that.subject) &&
|
||||
ObjectUtils.nullSafeEquals(this.text, that.text)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user