Browse Source

克隆时出现的NPE问题

pull/1/head
richie 6 years ago
parent
commit
e6221580d9
  1. 12
      src/main/java/com/fr/plugin/file/submit/oss/fun/OssSubmitTarget.java

12
src/main/java/com/fr/plugin/file/submit/oss/fun/OssSubmitTarget.java

@ -100,9 +100,15 @@ public class OssSubmitTarget implements XMLable {
public Object clone() throws CloneNotSupportedException {
OssSubmitTarget cloned = (OssSubmitTarget) super.clone();
cloned.bucket = bucket;
cloned.directory = (OssVariableValue) directory.clone();
cloned.name = (OssVariableValue) name.clone();
cloned.file = (OssVariableValue) file.clone();
if (directory != null) {
cloned.directory = (OssVariableValue) directory.clone();
}
if (name != null) {
cloned.name = (OssVariableValue) name.clone();
}
if (file != null) {
cloned.file = (OssVariableValue) file.clone();
}
return cloned;
}
}

Loading…
Cancel
Save