equal
deleted
inserted
replaced
23 * questions. |
23 * questions. |
24 */ |
24 */ |
25 |
25 |
26 package com.sun.java.browser.dom; |
26 package com.sun.java.browser.dom; |
27 |
27 |
|
28 import java.security.AccessController; |
|
29 import java.security.PrivilegedAction; |
|
30 |
28 public abstract class DOMService |
31 public abstract class DOMService |
29 { |
32 { |
30 /** |
33 /** |
31 * Returns new instance of a DOMService. The implementation |
34 * Returns new instance of a DOMService. The implementation |
32 * of the DOMService returns depends on the setting of the |
35 * of the DOMService returns depends on the setting of the |
41 public static DOMService getService(Object obj) |
44 public static DOMService getService(Object obj) |
42 throws DOMUnsupportedException |
45 throws DOMUnsupportedException |
43 { |
46 { |
44 try |
47 try |
45 { |
48 { |
46 String provider = java.security.AccessController.doPrivileged( |
49 String provider = AccessController.doPrivileged( |
47 new sun.security.action.GetPropertyAction("com.sun.java.browser.dom.DOMServiceProvider")); |
50 (PrivilegedAction<String>) () -> |
|
51 System.getProperty("com.sun.java.browser.dom.DOMServiceProvider")); |
48 |
52 |
49 Class clazz = Class.forName("sun.plugin.dom.DOMService"); |
53 Class clazz = Class.forName("sun.plugin.dom.DOMService"); |
50 |
54 |
51 return (DOMService) clazz.newInstance(); |
55 return (DOMService) clazz.newInstance(); |
52 } |
56 } |