< prev index next >

src/java.base/share/classes/java/util/jar/Manifest.java

Print this page
rev 52037 : 8211860: Avoid reading security properties eagerly on Manifest class initialization
Reviewed-by: TBD

@@ -47,13 +47,10 @@
  * @see     Attributes
  * @since   1.2
  */
 public class Manifest implements Cloneable {
 
-    private static final boolean jarInfoInExceptionText =
-        SecurityProperties.includedInExceptions("jar");
-
     // manifest main attributes
     private Attributes attr = new Attributes();
 
     // manifest entries
     private Map<String, Attributes> entries = new HashMap<>();

@@ -201,14 +198,13 @@
         }
         return;
     }
 
     static String getErrorPosition(String filename, final int lineNumber) {
-        if (filename == null || !jarInfoInExceptionText) {
+        if (filename == null || !SecurityProperties.INCLUDE_JAR_IN_EXCEPTIONS) {
             return "line " + lineNumber;
         }
-
         return "manifest of " + filename + ":" + lineNumber;
     }
 
     /**
      * Reads the Manifest from the specified InputStream. The entry
< prev index next >