mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8267521: Post JEP 411 refactoring: maximum covering > 50K
Reviewed-by: dfuchs, prr
This commit is contained in:
parent
40d23a0c0b
commit
508cec7535
18 changed files with 205 additions and 104 deletions
|
@ -62,7 +62,6 @@ import sun.util.logging.PlatformLogger;
|
|||
* implementations. The platform specific parts are declared as abstract
|
||||
* methods that have to be implemented by specific implementations.
|
||||
*/
|
||||
@SuppressWarnings("removal")
|
||||
public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
|
||||
|
||||
private static class TTFilter implements FilenameFilter {
|
||||
|
@ -266,6 +265,11 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
|
|||
private static int maxSoftRefCnt = 10;
|
||||
|
||||
static {
|
||||
initStatic();
|
||||
}
|
||||
|
||||
@SuppressWarnings("removal")
|
||||
private static void initStatic() {
|
||||
AccessController.doPrivileged(new PrivilegedAction<Void>() {
|
||||
public Void run() {
|
||||
FontManagerNativeLibrary.load();
|
||||
|
@ -306,6 +310,7 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
|
|||
/* Initialise ptrs used by JNI methods */
|
||||
private static native void initIDs();
|
||||
|
||||
@SuppressWarnings("removal")
|
||||
protected SunFontManager() {
|
||||
AccessController.doPrivileged(new PrivilegedAction<Void>() {
|
||||
public Void run() {
|
||||
|
@ -1112,6 +1117,7 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
|
|||
|
||||
private boolean haveCheckedUnreferencedFontFiles;
|
||||
|
||||
@SuppressWarnings("removal")
|
||||
private String[] getFontFilesFromPath(boolean noType1) {
|
||||
final FilenameFilter filter;
|
||||
if (noType1) {
|
||||
|
@ -1446,6 +1452,7 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
|
|||
return new HashMap<>(0);
|
||||
}
|
||||
|
||||
@SuppressWarnings("removal")
|
||||
Font2D findFontFromPlatformMap(String lcName, int style) {
|
||||
HashMap<String, FamilyDescription> platformFontMap = SunFontManager.platformFontMap;
|
||||
if (platformFontMap == null) {
|
||||
|
@ -1739,6 +1746,7 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
|
|||
} else if (pathDirs.length==1) {
|
||||
return pathDirs[0] + File.separator + s;
|
||||
} else {
|
||||
@SuppressWarnings("removal")
|
||||
String path = AccessController.doPrivileged(
|
||||
new PrivilegedAction<String>() {
|
||||
public String run() {
|
||||
|
@ -2204,6 +2212,7 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
|
|||
|
||||
private int createdFontCount = 0;
|
||||
|
||||
@SuppressWarnings("removal")
|
||||
public Font2D[] createFont2D(File fontFile, int fontFormat, boolean all,
|
||||
boolean isCopy, CreatedFontTracker tracker)
|
||||
throws FontFormatException {
|
||||
|
@ -2952,6 +2961,7 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
|
|||
return fontPath;
|
||||
}
|
||||
|
||||
@SuppressWarnings("removal")
|
||||
protected void loadFonts() {
|
||||
if (discoveredAllFonts) {
|
||||
return;
|
||||
|
@ -3069,6 +3079,7 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
|
|||
return defaultFontName;
|
||||
}
|
||||
|
||||
@SuppressWarnings("removal")
|
||||
public void loadFontFiles() {
|
||||
loadFonts();
|
||||
if (loadedAllFontFiles) {
|
||||
|
@ -3433,6 +3444,7 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
|
|||
// Provides an aperture to add native font family names to the map
|
||||
protected void addNativeFontFamilyNames(TreeMap<String, String> familyNames, Locale requestedLocale) { }
|
||||
|
||||
@SuppressWarnings("removal")
|
||||
public void register1dot0Fonts() {
|
||||
AccessController.doPrivileged(new PrivilegedAction<Void>() {
|
||||
public Void run() {
|
||||
|
@ -3472,6 +3484,7 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
|
|||
* on windows and uses that if set.
|
||||
*/
|
||||
private static Locale systemLocale = null;
|
||||
@SuppressWarnings("removal")
|
||||
private static Locale getSystemStartupLocale() {
|
||||
if (systemLocale == null) {
|
||||
systemLocale = AccessController.doPrivileged(new PrivilegedAction<Locale>() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue