Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ public Advice getAdvice() {
}

@Override
public boolean equals(Object other) {
public boolean equals(@Nullable Object other) {
return (this == other || (other instanceof AdvisorKeyEntry that &&
this.adviceType == that.adviceType &&
ObjectUtils.nullSafeEquals(this.classFilterKey, that.classFilterKey) &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ public boolean matches(Class<?> clazz) {
}

@Override
public boolean equals(Object other) {
public boolean equals(@Nullable Object other) {
return (this == other || (other instanceof NegateClassFilter that &&
this.original.equals(that.original)));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ public boolean matches(Method method, Class<?> targetClass, @Nullable Object...
}

@Override
public boolean equals(Object other) {
public boolean equals(@Nullable Object other) {
return (this == other || (other instanceof NegateMethodMatcher that &&
this.original.equals(that.original)));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ private void clearBit(int index) {


@Override
public boolean equals(Object other) {
public boolean equals(@Nullable Object other) {
return (this == other || (other instanceof BitsCronField that &&
type() == that.type() && this.bits == that.bits));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ public String toString(int index, int length, Charset charset) {


@Override
public boolean equals(Object other) {
public boolean equals(@Nullable Object other) {
return (this == other || (other instanceof JettyDataBuffer otherBuffer &&
this.delegate.equals(otherBuffer.delegate)));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

import java.util.Set;

import org.jspecify.annotations.Nullable;

import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.test.context.ContextCustomizer;
Expand Down Expand Up @@ -69,7 +71,7 @@ Set<BeanOverrideHandler> getBeanOverrideHandlers() {
}

@Override
public boolean equals(Object other) {
public boolean equals(@Nullable Object other) {
if (other == this) {
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ protected void trackOverrideInstance(Object override, SingletonBeanRegistry sing
}

@Override
public boolean equals(Object other) {
public boolean equals(@Nullable Object other) {
if (other == this) {
return true;
}
Expand Down
3 changes: 2 additions & 1 deletion spring-web/src/main/java/org/springframework/http/ETag.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jspecify.annotations.Nullable;

import org.springframework.util.StringUtils;

Expand Down Expand Up @@ -68,7 +69,7 @@ public boolean compare(ETag other, boolean strong) {
}

@Override
public boolean equals(Object other) {
public boolean equals(@Nullable Object other) {
return (this == other ||
(other instanceof ETag oet && this.tag.equals(oet.tag) && this.weak == oet.weak));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2331,7 +2331,7 @@ public List<String> setValue(List<String> value) {
}

@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (this == o) {
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import org.jspecify.annotations.Nullable;

import org.springframework.util.Assert;

/**
Expand Down Expand Up @@ -106,7 +108,7 @@ public int compareTo(SemanticApiVersionParser.Version other) {
}

@Override
public boolean equals(Object other) {
public boolean equals(@Nullable Object other) {
return (this == other || (other instanceof Version otherVersion &&
this.major == otherVersion.major &&
this.minor == otherVersion.minor &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ private static class AnnotationDescriptor {
}

@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
return (obj instanceof AnnotationDescriptor that && this.httpExchange.equals(that.httpExchange));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2019,7 +2019,7 @@ else if (!hasOpaquePath() &&
}

@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (obj == this) {
return true;
}
Expand Down Expand Up @@ -2160,7 +2160,7 @@ public String domain() {
}

@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (o == this) {
return true;
}
Expand Down Expand Up @@ -2207,7 +2207,7 @@ public IpAddress address() {
}

@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (obj == this) {
return true;
}
Expand Down Expand Up @@ -2271,7 +2271,7 @@ public static OpaqueHost parse(String input, WhatWgUrlParser p) {
}

@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (obj == this) {
return true;
}
Expand Down Expand Up @@ -2304,7 +2304,7 @@ private EmptyHost() {
}

@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
return obj == this || obj != null && getClass() == obj.getClass();
}

Expand Down Expand Up @@ -2503,7 +2503,7 @@ else if (ch0 == '0') {


@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (o == this) {
return true;
}
Expand Down Expand Up @@ -2812,7 +2812,7 @@ else if (start >= 0) {
}

@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (obj == this) {
return true;
}
Expand Down Expand Up @@ -2978,7 +2978,7 @@ public Path clone() {
}

@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (o == this) {
return true;
}
Expand Down Expand Up @@ -3073,7 +3073,7 @@ public String name() {
}

@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (o == this) {
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ private static class AnnotationDescriptor {
}

@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
return (obj instanceof AnnotationDescriptor that && this.annotation.equals(that.annotation));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ private static class AnnotationDescriptor {
}

@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
return (obj instanceof AnnotationDescriptor that && this.annotation.equals(that.annotation));
}

Expand Down