24 */
25
26 package javax.xml.xpath;
27
28 import java.io.File;
29 import java.lang.reflect.InvocationTargetException;
30 import java.lang.reflect.Method;
31 import java.lang.reflect.Modifier;
32 import java.security.AccessControlContext;
33 import java.security.AccessController;
34 import java.security.PrivilegedAction;
35 import java.util.Properties;
36 import java.util.ServiceConfigurationError;
37 import java.util.ServiceLoader;
38 import java.util.function.Supplier;
39 import jdk.xml.internal.SecuritySupport;
40
41 /**
42 * Implementation of {@link XPathFactory#newInstance(String)}.
43 *
44 * @author <a href="Kohsuke.Kawaguchi@Sun.com">Kohsuke Kawaguchi</a>
45 * @since 1.5
46 */
47 class XPathFactoryFinder {
48 private static final String DEFAULT_PACKAGE = "com.sun.org.apache.xpath.internal";
49
50 /** debug support code. */
51 private static boolean debug = false;
52 static {
53 // Use try/catch block to support applets
54 try {
55 debug = SecuritySupport.getSystemProperty("jaxp.debug") != null;
56 } catch (Exception unused) {
57 debug = false;
58 }
59 }
60
61 /**
62 * <p>Cache properties for performance.</p>
63 */
64 private static final Properties cacheProps = new Properties();
|
24 */
25
26 package javax.xml.xpath;
27
28 import java.io.File;
29 import java.lang.reflect.InvocationTargetException;
30 import java.lang.reflect.Method;
31 import java.lang.reflect.Modifier;
32 import java.security.AccessControlContext;
33 import java.security.AccessController;
34 import java.security.PrivilegedAction;
35 import java.util.Properties;
36 import java.util.ServiceConfigurationError;
37 import java.util.ServiceLoader;
38 import java.util.function.Supplier;
39 import jdk.xml.internal.SecuritySupport;
40
41 /**
42 * Implementation of {@link XPathFactory#newInstance(String)}.
43 *
44 * @author Kohsuke Kawaguchi
45 * @since 1.5
46 */
47 class XPathFactoryFinder {
48 private static final String DEFAULT_PACKAGE = "com.sun.org.apache.xpath.internal";
49
50 /** debug support code. */
51 private static boolean debug = false;
52 static {
53 // Use try/catch block to support applets
54 try {
55 debug = SecuritySupport.getSystemProperty("jaxp.debug") != null;
56 } catch (Exception unused) {
57 debug = false;
58 }
59 }
60
61 /**
62 * <p>Cache properties for performance.</p>
63 */
64 private static final Properties cacheProps = new Properties();
|