Skip to content
Merged
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 @@ -30,6 +30,7 @@
import java.util.Arrays;
import java.util.Objects;
import java.util.stream.Stream;
import org.jspecify.annotations.Nullable;

import static java.lang.constant.ConstantDescs.CD_String;
import static java.util.Objects.requireNonNull;
Expand Down Expand Up @@ -258,7 +259,7 @@ public CallSite resolveCallSiteDesc(MethodHandles.Lookup lookup) throws Throwabl
* is equal to this {@code DynamicCallSiteDesc}.
*/
@Override
public final boolean equals(Object o) {
public final boolean equals(@Nullable Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
DynamicCallSiteDesc specifier = (DynamicCallSiteDesc) o;
Expand Down
3 changes: 2 additions & 1 deletion src/java.base/share/classes/java/text/ChoiceFormat.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Objects;
import org.jspecify.annotations.Nullable;

/**
* {@code ChoiceFormat} is a concrete subclass of {@code NumberFormat} that
Expand Down Expand Up @@ -733,7 +734,7 @@ public String toString() {
* @see Object#equals(Object)
*/
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (this == obj) // quick check
return true;
if (obj == null || getClass() != obj.getClass())
Expand Down
3 changes: 2 additions & 1 deletion src/java.base/share/classes/java/text/DateFormatSymbols.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
import java.util.ResourceBundle;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import org.jspecify.annotations.Nullable;
import sun.util.locale.provider.CalendarDataUtility;
import sun.util.locale.provider.LocaleProviderAdapter;
import sun.util.locale.provider.LocaleServiceProviderPool;
Expand Down Expand Up @@ -687,7 +688,7 @@ public int hashCode() {
* @see Object#equals(Object)
*/
@Override
public boolean equals(Object obj)
public boolean equals(@Nullable Object obj)
{
if (this == obj) return true;
if (obj == null || getClass() != obj.getClass()) return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
import java.util.Currency;
import java.util.Locale;
import java.util.Objects;
import org.jspecify.annotations.Nullable;
import sun.util.locale.provider.CalendarDataUtility;
import sun.util.locale.provider.LocaleProviderAdapter;
import sun.util.locale.provider.LocaleServiceProviderPool;
Expand Down Expand Up @@ -762,7 +763,7 @@ public Object clone() {
* @see Object#equals(Object)
*/
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (this == obj) return true;
if (obj == null || getClass() != obj.getClass()) return false;
DecimalFormatSymbols other = (DecimalFormatSymbols) obj;
Expand Down
3 changes: 2 additions & 1 deletion src/java.base/share/classes/java/text/NumberFormat.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
import java.util.Objects;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
import org.jspecify.annotations.Nullable;

import sun.util.locale.provider.LocaleProviderAdapter;
import sun.util.locale.provider.LocaleServiceProviderPool;
Expand Down Expand Up @@ -864,7 +865,7 @@ public int hashCode() {
* @see Object#equals(Object)
*/
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (this == obj) {
return true;
}
Expand Down
Loading