error in xmlrpc typeconversion

This commit is contained in:
Peter Hormanns 2012-07-18 15:30:40 +00:00
parent 32f8e90490
commit a19480f55b

View File

@ -63,10 +63,12 @@ public class DomainRemote extends AbstractRemote {
}
Set<DomainOption> domainOptionsSet = new TreeSet<DomainOption>();
Object domOptsObj = setParams.get("domainoptions");
if (domOptsObj != null && domOptsObj instanceof List<?>) {
List<String> domOptions = (List<String>) domOptsObj;
for (String optString : domOptions) {
domOptions.add(optString);
if (domOptsObj != null && domOptsObj instanceof Object[]) {
Object[] domOptions = (Object[]) domOptsObj;
for (int i=0; i<domOptions.length; i++) {
DomainOption domainOption = new DomainOption();
domainOption.setName((String)domOptions[i]);
domainOptionsSet.add(domainOption);
}
}
dom.setDomainOptions(domainOptionsSet);