HSAdmin Backend Domains, E-Mail, Datenbanken
Peter Hormanns
2018-07-05 a6a2298a5ca15e84e2dbfb141eba52637c4ea5cd
fix email-target mapping from hsscript
1 files modified
16 ■■■■ changed files
hsarback/src/de/hsadmin/remote/EMailAddressRemote.java 16 ●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/remote/EMailAddressRemote.java
@@ -55,8 +55,8 @@
        }
        Object l = map.get("target");
        if (l != null && l instanceof Object[]) {
            StringBuffer tBuff = new StringBuffer();
            Object[] targetObjArray = (Object[]) l;
            final StringBuffer tBuff = new StringBuffer();
            final Object[] targetObjArray = (Object[]) l;
            for (int idx=0; idx<targetObjArray.length; idx++) {
                if (targetObjArray[idx] instanceof String) {
                    if (tBuff.length() > 0) {
@@ -66,6 +66,18 @@
                }
            }
            adr.setTarget(tBuff.toString());
        } else if ((l != null && l instanceof Map<?, ?>)) {
            final StringBuffer tBuff = new StringBuffer();
            final Map<? ,?> targetObjMap = (Map<?, ?>) l;
            for (Object targetObj : targetObjMap.values()) {
                if (targetObj instanceof String) {
                    if (tBuff.length() > 0) {
                        tBuff.append(',');
                    }
                    tBuff.append((String) targetObj);
                }
            }
            adr.setTarget(tBuff.toString());
        } else {
            if (l != null && l instanceof String) {
                adr.setTarget((String) l);