Skip to content

Commit

Permalink
Annotate HexFormat.
Browse files Browse the repository at this point in the history
  • Loading branch information
cpovirk committed Oct 4, 2024
1 parent cbe846f commit b598b33
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/java.base/share/classes/java/util/HexFormat.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@

package java.util;

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

import jdk.internal.access.JavaLangAccess;
import jdk.internal.access.SharedSecrets;
import jdk.internal.util.HexDigits;
Expand Down Expand Up @@ -137,6 +140,7 @@
*/


@NullMarked
public final class HexFormat {

// Access to create strings from a byte array.
Expand Down Expand Up @@ -1056,7 +1060,7 @@ public static long fromHexDigitsToLong(CharSequence string, int fromIndex, int t
* otherwise {@code false}
*/
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
Expand Down

0 comments on commit b598b33

Please sign in to comment.