Skip to content

Commit

Permalink
Annotate Record.
Browse files Browse the repository at this point in the history
Upstream did some work in this file earlier this year but not for
nullness:
typetools/jdk@fcaecfe
  • Loading branch information
cpovirk committed Oct 3, 2024
1 parent cbe846f commit 47595ee
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/java.base/share/classes/java/lang/Record.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
*/
package java.lang;

import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;

/**
* This is the common base class of all Java language record classes.
*
Expand Down Expand Up @@ -87,6 +90,7 @@
* @jls 8.10 Record Classes
* @since 16
*/
@NullMarked
public abstract class Record {
/**
* Constructor for record classes to call.
Expand Down Expand Up @@ -140,7 +144,7 @@ protected Record() {}
* argument; {@code false} otherwise.
*/
@Override
public abstract boolean equals(Object obj);
public abstract boolean equals(@Nullable Object obj);

/**
* Returns a hash code value for the record.
Expand Down

0 comments on commit 47595ee

Please sign in to comment.