From 6cf64477c66e15c4cfb9e23019ad34ce0317d2af Mon Sep 17 00:00:00 2001 From: Chris Povirk Date: Mon, 7 Oct 2024 10:46:25 -0400 Subject: [PATCH] Add missing `@Nullable` annotation to `Locale.getExtension`. (#74) This isn't a new API; we just missed this one. --- src/java.base/share/classes/java/util/Locale.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/java.base/share/classes/java/util/Locale.java b/src/java.base/share/classes/java/util/Locale.java index b2fa2da9928..3438c1526e5 100644 --- a/src/java.base/share/classes/java/util/Locale.java +++ b/src/java.base/share/classes/java/util/Locale.java @@ -1465,7 +1465,7 @@ public Locale stripExtensions() { * @see #UNICODE_LOCALE_EXTENSION * @since 1.7 */ - public String getExtension(char key) { + public @Nullable String getExtension(char key) { if (!LocaleExtensions.isValidKey(key)) { throw new IllegalArgumentException("Ill-formed extension key: " + key); }