for (int i = 0; i < sv.length; i++) e.addAttribute(name, sv[i], Element.DISP_ELEMENT); } else if (value instanceof String) e.addAttribute(name, (String) value, Element.DISP_ELEMENT);
for (int i = 0; i < sv.length; i++) { Element pref = eattrs.addElement(AccountService.E_ATTR); pref.addAttribute(AccountService.A_NAME, name); pref.setText(sv[i]); } } else if (value instanceof String) { Element pref = eattrs.addElement(AccountService.E_ATTR); pref.addAttribute(AccountService.A_NAME, name); pref.setText((String) value); }
    static void doAttrs(Element e, Map attrs) throws ServiceException {         for (Iterator mit = attrs.entrySet().iterator(); mit.hasNext(); ) {            Map.Entry entry = (Entry) mit.next();            String name = (String) entry.getKey();            Object value = entry.getValue();            // TODO: might be being too paranoid, but there doesn't seem like a good reason to return this            if (name.equals(Provisioning.A_userPassword))                value = "VALUE-BLOCKED";            if (value instanceof String[]) {                String sv[] = (String[]) value;                for (int i = 0; i < sv.length; i++)                    e.addAttribute(name, sv[i], Element.DISP_ELEMENT);            } else if (value instanceof String)                e.addAttribute(name, (String) value, Element.DISP_ELEMENT);        }           }