提交 850420b6 编写于 作者: X xuelei

8005598: (reopened) Need to clone array of input/output parameters

Reviewed-by: weijun
上级 e3b4af2f
......@@ -102,7 +102,7 @@ public class DnsContext extends ComponentDirContext {
this.domain = new DnsName(domain.endsWith(".")
? domain
: domain + ".");
this.servers = servers;
this.servers = (servers == null) ? null : servers.clone();
this.environment = (Hashtable<Object,Object>) environment.clone();
envShared = false;
parentIsDns = false;
......@@ -129,11 +129,11 @@ public class DnsContext extends ComponentDirContext {
* no conflict.
*/
private DnsContext(DnsContext ctx) {
environment = ctx.environment;
environment = ctx.environment; // shared environment, copy-on-write
envShared = ctx.envShared = true;
parentIsDns = ctx.parentIsDns;
domain = ctx.domain;
servers = ctx.servers;
servers = ctx.servers; // shared servers, no write operation
resolver = ctx.resolver;
authoritative = ctx.authoritative;
recursion = ctx.recursion;
......
......@@ -81,7 +81,7 @@ public class BasicControl implements Control {
this.id = id;
this.criticality = criticality;
if (value != null) {
this.value = value;
this.value = value.clone();
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册