2049 (PrivilegedAction<String>) () -> System.getProperty("sun.rmi.activation.execPolicy"));
2050 if (execPolicyClassName == null) {
2051 if (!stop) {
2052 DefaultExecPolicy.checkConfiguration();
2053 }
2054 execPolicyClassName = "default";
2055 }
2056
2057 /**
2058 * Initialize method for activation exec policy.
2059 */
2060 if (!execPolicyClassName.equals("none")) {
2061 if (execPolicyClassName.equals("") ||
2062 execPolicyClassName.equals("default"))
2063 {
2064 execPolicyClassName = DefaultExecPolicy.class.getName();
2065 }
2066
2067 try {
2068 Class<?> execPolicyClass = getRMIClass(execPolicyClassName);
2069 execPolicy = execPolicyClass.newInstance();
2070 execPolicyMethod =
2071 execPolicyClass.getMethod("checkExecCommand",
2072 ActivationGroupDesc.class,
2073 String[].class);
2074 } catch (Exception e) {
2075 if (debugExec) {
2076 System.err.println(
2077 getTextResource("rmid.exec.policy.exception"));
2078 e.printStackTrace();
2079 }
2080 bomb(getTextResource("rmid.exec.policy.invalid"));
2081 }
2082 }
2083
2084 if (stop == true) {
2085 final int finalPort = port;
2086 AccessController.doPrivileged(new PrivilegedAction<Void>() {
2087 public Void run() {
2088 System.setProperty("java.rmi.activation.port",
2089 Integer.toString(finalPort));
|
2049 (PrivilegedAction<String>) () -> System.getProperty("sun.rmi.activation.execPolicy"));
2050 if (execPolicyClassName == null) {
2051 if (!stop) {
2052 DefaultExecPolicy.checkConfiguration();
2053 }
2054 execPolicyClassName = "default";
2055 }
2056
2057 /**
2058 * Initialize method for activation exec policy.
2059 */
2060 if (!execPolicyClassName.equals("none")) {
2061 if (execPolicyClassName.equals("") ||
2062 execPolicyClassName.equals("default"))
2063 {
2064 execPolicyClassName = DefaultExecPolicy.class.getName();
2065 }
2066
2067 try {
2068 Class<?> execPolicyClass = getRMIClass(execPolicyClassName);
2069 @SuppressWarnings("deprecation")
2070 Object tmp = execPolicyClass.newInstance();
2071 execPolicy = tmp;
2072 execPolicyMethod =
2073 execPolicyClass.getMethod("checkExecCommand",
2074 ActivationGroupDesc.class,
2075 String[].class);
2076 } catch (Exception e) {
2077 if (debugExec) {
2078 System.err.println(
2079 getTextResource("rmid.exec.policy.exception"));
2080 e.printStackTrace();
2081 }
2082 bomb(getTextResource("rmid.exec.policy.invalid"));
2083 }
2084 }
2085
2086 if (stop == true) {
2087 final int finalPort = port;
2088 AccessController.doPrivileged(new PrivilegedAction<Void>() {
2089 public Void run() {
2090 System.setProperty("java.rmi.activation.port",
2091 Integer.toString(finalPort));
|