[FIXED JENKINS-18074] Avoid clearing AbstractItem.displayName when the new parent ItemGroup is different.

This commit is contained in:
Jesse Glick committed 2013-05-24 12:06:37 -04:00
1 parent 6cb7fc4ae3
commit 04e2ccade6
4 files changed
+29 -1

No files matched your search

@@ -136,6 +136,17 @@ public class MockFolder extends AbstractItem implements ModifiableTopLevelItemGr
return mixin().copy(src, name);
}
@Override public void onCopiedFrom(Item src) {
super.onCopiedFrom(src);
for (TopLevelItem item : ((MockFolder) src).getItems()) {
try {
copy(item, item.getName());
} catch (IOException x) {
assert false : x;
}
}
}
@Override public TopLevelItem createProjectFromXML(String name, InputStream xml) throws IOException {
return mixin().createProjectFromXML(name, xml);
}