Skip to content

Commit

Permalink
Add missing @Nullable annotation to Locale.getExtension. (#74)
Browse files Browse the repository at this point in the history
This isn't a new API; we just missed this one.
  • Loading branch information
cpovirk authored Oct 7, 2024
1 parent 416afad commit 6cf6447
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/java.base/share/classes/java/util/Locale.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 6cf6447

Please sign in to comment.