equal
deleted
inserted
replaced
28 import java.util.*; |
28 import java.util.*; |
29 import java.util.concurrent.ConcurrentHashMap; |
29 import java.util.concurrent.ConcurrentHashMap; |
30 import java.io.*; |
30 import java.io.*; |
31 import java.net.URL; |
31 import java.net.URL; |
32 |
32 |
|
33 import jdk.internal.event.EventHelper; |
|
34 import jdk.internal.event.SecurityPropertyModificationEvent; |
33 import jdk.internal.access.SharedSecrets; |
35 import jdk.internal.access.SharedSecrets; |
34 import jdk.internal.util.StaticProperty; |
36 import jdk.internal.util.StaticProperty; |
35 import sun.security.util.Debug; |
37 import sun.security.util.Debug; |
36 import sun.security.util.PropertyExpander; |
38 import sun.security.util.PropertyExpander; |
37 |
39 |
790 * |
792 * |
791 * @see #getProperty |
793 * @see #getProperty |
792 * @see java.security.SecurityPermission |
794 * @see java.security.SecurityPermission |
793 */ |
795 */ |
794 public static void setProperty(String key, String datum) { |
796 public static void setProperty(String key, String datum) { |
795 check("setProperty."+key); |
797 check("setProperty." + key); |
796 props.put(key, datum); |
798 props.put(key, datum); |
797 invalidateSMCache(key); /* See below. */ |
799 invalidateSMCache(key); /* See below. */ |
|
800 |
|
801 SecurityPropertyModificationEvent spe = new SecurityPropertyModificationEvent(); |
|
802 // following is a no-op if event is disabled |
|
803 spe.key = key; |
|
804 spe.value = datum; |
|
805 spe.commit(); |
|
806 |
|
807 if (EventHelper.isLoggingSecurity()) { |
|
808 EventHelper.logSecurityPropertyEvent(key, datum); |
|
809 } |
798 } |
810 } |
799 |
811 |
800 /* |
812 /* |
801 * Implementation detail: If the property we just set in |
813 * Implementation detail: If the property we just set in |
802 * setProperty() was either "package.access" or |
814 * setProperty() was either "package.access" or |