Skip to content

Commit

Permalink
Tiny improvement to null check
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed May 5, 2024
1 parent 5d345d6 commit 8c646d9
Showing 1 changed file with 2 additions and 4 deletions.
Expand Up @@ -2,6 +2,7 @@

import java.io.*;
import java.nio.ByteBuffer;
import java.util.Objects;

import com.fasterxml.jackson.core.SerializableString;

Expand Down Expand Up @@ -49,10 +50,7 @@ public class SerializedString
protected /*volatile*/ char[] _quotedChars;

public SerializedString(String v) {
if (v == null) {
throw new IllegalStateException("Null String illegal for SerializedString");
}
_value = v;
_value = Objects.requireNonNull(v, "Null String illegal for SerializedString");
}

/*
Expand Down

0 comments on commit 8c646d9

Please sign in to comment.