private Map<String, Object> cloneAttributes(Map<String, Object> attrs) {

        Map<String, Object> result = new HashMap<String, Object>();
        for (Entry<String, Object> entry : attrs.entrySet()) {
            if (entry.getValue() instanceof CmsJspStandardContextBean) {
                result.put(entry.getKey(), ((CmsJspStandardContextBean)entry.getValue()).createCopy());
            } else if (entry.getValue() instanceof Cloneable) {
                Object clone = null;
                try {
                    clone = ObjectUtils.clone(entry.getValue());
                } catch (Exception e) {
                    LOG.info(e.getMessage(), e);
                }

                result.put(entry.getKey(), clone != null ? clone : entry.getValue());
            } else {
                result.put(entry.getKey(), entry.getValue());
            }

        }

        return result;
    }
private Map < String , Object > cloneAttributes ( Map < String , Object > attrs ) { Map < String , Object > result = new HashMap < String , Object > ( ) ; for ( Entry < String , Object > entry : attrs . entrySet ( ) ) { if ( entry . getValue ( ) instanceof CmsJspStandardContextBean ) { result . put ( entry . getKey ( ) , ( ( CmsJspStandardContextBean ) entry . getValue ( ) ) . createCopy ( ) ) ; } else if ( entry . getValue ( ) instanceof Cloneable ) { Object clone = null ; try { clone = ObjectUtils . clone ( entry . getValue ( ) ) ; } catch ( Exception e ) { LOG . info ( e . getMessage ( ) , e ) ; } result . put ( entry . getKey ( ) , clone != null ? clone : entry . getValue ( ) ) ; } else { result . put ( entry . getKey ( ) , entry . getValue ( ) ) ; } } return result ; }
Clones the attribute instances if possible.<p>

@param attrs the attributes

@return a new map instance with the cloned attributes