changeset 1872:78dbc547ac78

6899851: Regression causes new dependency to jkernel Summary: Replaced sun.jkernel.DownloadManager calls with BootClassLoaderHook Reviewed-by: bae, asaha
author mchung
date Thu, 12 Nov 2009 10:29:21 -0800
parents eb8b08775b82
children 60646a58322b
files src/share/classes/java/awt/color/ICC_Profile.java
diffstat 1 files changed, 5 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/awt/color/ICC_Profile.java	Thu Nov 12 11:20:51 2009 +0000
+++ b/src/share/classes/java/awt/color/ICC_Profile.java	Thu Nov 12 10:29:21 2009 -0800
@@ -865,7 +865,7 @@
         case ColorSpace.CS_PYCC:
             synchronized(ICC_Profile.class) {
                 if (PYCCprofile == null) {
-                    if (!sun.jkernel.DownloadManager.isJREComplete() ||
+                    if (BootClassLoaderHook.getHook() != null ||
                         standardProfileExists("PYCC.pf"))
                     {
                         ProfileDeferralInfo pInfo =
@@ -1835,19 +1835,6 @@
                 }
             }
 
-        if (!f.isFile()) { /* try the directory of built-in profiles */
-            dir = System.getProperty("java.home") +
-                File.separatorChar + "lib" + File.separatorChar + "cmm";
-            fullPath = dir + File.separatorChar + fileName;
-                f = new File(fullPath);
-                if (!f.isFile()) {
-                    //make sure file was installed in the kernel mode
-                    BootClassLoaderHook hook = BootClassLoaderHook.getHook();
-                    if (hook.getHook() != null) {
-                        hook.prefetchFile("lib/cmm/"+fileName);
-                    }
-                }
-            }
         if ((f == null) || (!f.isFile())) {
             /* try the directory of built-in profiles */
             f = getStandardProfileFile(fileName);
@@ -1871,11 +1858,10 @@
         File f = new File(fullPath);
         if (!f.isFile()) {
             //make sure file was installed in the kernel mode
-            try {
-                //kernel uses platform independent paths =>
-                //   should not use platform separator char
-                sun.jkernel.DownloadManager.downloadFile("lib/cmm/"+fileName);
-            } catch (IOException ioe) {}
+            BootClassLoaderHook hook = BootClassLoaderHook.getHook();
+            if (hook != null) {
+                hook.prefetchFile("lib/cmm/"+fileName);
+            }
         }
         return (f.isFile() && isChildOf(f, dir)) ? f : null;
     }