Skip to content

Commit 3d52ab0

Browse files
committed
Annotate CharsetProvider.
This follows google/xplat@1c36013
1 parent fd65be6 commit 3d52ab0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/java.base/share/classes/java/nio/charset/spi/CharsetProvider.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
import java.nio.charset.Charset;
2929
import java.util.Iterator;
3030

31+
import org.jspecify.annotations.NullMarked;
32+
import org.jspecify.annotations.Nullable;
3133

3234
/**
3335
* Charset service-provider class.
@@ -79,7 +81,7 @@
7981
*
8082
* @see java.nio.charset.Charset
8183
*/
82-
84+
@NullMarked
8385
public abstract class CharsetProvider {
8486

8587
/**
@@ -109,6 +111,6 @@ protected CharsetProvider() {
109111
* or {@code null} if the named charset
110112
* is not supported by this provider
111113
*/
112-
public abstract Charset charsetForName(String charsetName);
114+
public abstract @Nullable Charset charsetForName(String charsetName);
113115

114116
}

0 commit comments

Comments
 (0)