Better (?) error when initializing and the security resource isn't found.

This commit is contained in:
norris%netscape.com 1999-04-30 16:56:43 +00:00
Родитель 79cb20e767
Коммит 3bb6bca352
2 изменённых файлов: 10 добавлений и 6 удалений

Просмотреть файл

@ -1645,14 +1645,16 @@ public final class Context {
private static boolean requireSecurityDomain = true;
static {
final String securityResourceName =
"org.mozilla.javascript.resources.Security";
try {
ResourceBundle rb = ResourceBundle.getBundle(
"org.mozilla.javascript.resources.Security");
ResourceBundle rb = ResourceBundle.getBundle(securityResourceName);
String s = rb.getString("security.requireSecurityDomain");
requireSecurityDomain = s.equals("true");
} catch (java.util.MissingResourceException mre) {
// Assume stricter policy.
requireSecurityDomain = true;
throw new SecurityException("Resource \"" + securityResourceName +
"\" not found.");
}
}

Просмотреть файл

@ -1645,14 +1645,16 @@ public final class Context {
private static boolean requireSecurityDomain = true;
static {
final String securityResourceName =
"org.mozilla.javascript.resources.Security";
try {
ResourceBundle rb = ResourceBundle.getBundle(
"org.mozilla.javascript.resources.Security");
ResourceBundle rb = ResourceBundle.getBundle(securityResourceName);
String s = rb.getString("security.requireSecurityDomain");
requireSecurityDomain = s.equals("true");
} catch (java.util.MissingResourceException mre) {
// Assume stricter policy.
requireSecurityDomain = true;
throw new SecurityException("Resource \"" + securityResourceName +
"\" not found.");
}
}