jdk/src/share/classes/sun/misc/URLClassPath.java
changeset 16023 58ecc1b8327b
parent 15688 625addfb4d4c
child 18223 35a5c2462991
--- a/jdk/src/share/classes/sun/misc/URLClassPath.java	Tue Jan 22 15:25:37 2013 +0100
+++ b/jdk/src/share/classes/sun/misc/URLClassPath.java	Fri Feb 22 14:04:06 2013 +0000
@@ -808,9 +808,6 @@
         /**
          * If the Profile attribute is present then this method checks that the runtime
          * supports that profile.
-         *
-         * ## Add a fast path like Class-Path to avoid reading the manifest when the attribute
-         *    is not present.
          */
         void checkProfileAttribute() throws IOException {
             Manifest man = jar.getManifest();
@@ -998,7 +995,8 @@
             parseExtensionsDependencies();
 
             // check Profile attribute if present
-            if (!profileCheckSuppressedByLauncher) {
+            if (!profileCheckSuppressedByLauncher &&
+                    SharedSecrets.javaUtilJarAccess().jarFileHasProfileAttribute(jar)) {
                 checkProfileAttribute();
             }