8211860: Avoid reading security properties eagerly on Manifest class initialization
Reviewed-by: mullan, alanb
This commit is contained in:
parent
8791ea8dc0
commit
d5d74f0e26
@ -49,9 +49,6 @@ import sun.security.util.SecurityProperties;
|
||||
*/
|
||||
public class Manifest implements Cloneable {
|
||||
|
||||
private static final boolean jarInfoInExceptionText =
|
||||
SecurityProperties.includedInExceptions("jar");
|
||||
|
||||
// manifest main attributes
|
||||
private Attributes attr = new Attributes();
|
||||
|
||||
@ -203,10 +200,10 @@ public class Manifest implements Cloneable {
|
||||
}
|
||||
|
||||
static String getErrorPosition(String filename, final int lineNumber) {
|
||||
if (filename == null || !jarInfoInExceptionText) {
|
||||
if (filename == null ||
|
||||
!SecurityProperties.INCLUDE_JAR_NAME_IN_EXCEPTIONS) {
|
||||
return "line " + lineNumber;
|
||||
}
|
||||
|
||||
return "manifest of " + filename + ":" + lineNumber;
|
||||
}
|
||||
|
||||
|
@ -32,6 +32,9 @@ import java.security.Security;
|
||||
|
||||
public class SecurityProperties {
|
||||
|
||||
public static final boolean INCLUDE_JAR_NAME_IN_EXCEPTIONS
|
||||
= includedInExceptions("jar");
|
||||
|
||||
/**
|
||||
* Returns the value of the security property propName, which can be overridden
|
||||
* by a system property of the same name
|
||||
|
Loading…
x
Reference in New Issue
Block a user