8344252: SM cleanup in java.util classes

Reviewed-by: naoto, smarks
This commit is contained in:
Roger Riggs 2024-11-15 20:29:14 +00:00
parent 59ffac84d3
commit c5b6ed8ca0
13 changed files with 160 additions and 330 deletions

View file

@ -222,22 +222,10 @@ import java.util.Locale;
*/
public abstract class LocaleServiceProvider {
private static Void checkPermission() {
@SuppressWarnings("removal")
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
sm.checkPermission(new RuntimePermission("localeServiceProvider"));
}
return null;
}
private LocaleServiceProvider(Void ignore) { }
/**
* Initializes a new locale service provider.
*/
protected LocaleServiceProvider() {
this(checkPermission());
}
protected LocaleServiceProvider() {}
/**
* {@return an array of all locales for which this locale service provider