The following document contains the results of PMD's CPD 4.2.5.
File | Line |
---|---|
info/magnolia/templating/elements/AreaElement.java | 394 |
info/magnolia/templating/elements/RenderElement.java | 101 |
} public Map<String, Object> getContextAttributes() { return contextAttributes; } public void setContextAttributes(Map<String, Object> contextAttributes) { this.contextAttributes = contextAttributes; } private void setContextAttributes(WebContext webContext, Map<String, Object> ctx) { if(ctx != null){ for(Entry<String, Object> entry : ctx.entrySet()) { final String key = entry.getKey(); if(webContext.containsKey(key)) { //save to tmp map savedCtxAttributes.put(key, webContext.get(key)); } webContext.setAttribute(key, entry.getValue(), WebContext.LOCAL_SCOPE); } } } private void restoreContextAttributes(WebContext webContext, Map<String, Object> ctx) { if(ctx != null) { for(Entry<String, Object> entry : ctx.entrySet()) { final String key = entry.getKey(); if(webContext.containsKey(key)) { webContext.setAttribute(key, savedCtxAttributes.get(key), WebContext.LOCAL_SCOPE); } webContext.removeAttribute(key, WebContext.LOCAL_SCOPE); } } } |