WW-3845 improves code to avoid empty HashSet

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1436940 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Lukasz Lenart
2013-01-22 14:13:07 +00:00
parent 4f98e9148d
commit 7010dd2f56
@@ -1243,7 +1243,6 @@ public abstract class UIBean extends Component {
Set<String> standardAttributes = standardAttributesMap.get(clz);
if (standardAttributes == null) {
standardAttributes = new HashSet<String>();
standardAttributesMap.put(clz, standardAttributes);
while (clz != null) {
for (Field f : clz.getDeclaredFields()) {
if (Modifier.isProtected(f.getModifiers())
@@ -1257,6 +1256,7 @@ public abstract class UIBean extends Component {
clz = clz.getSuperclass();
}
}
standardAttributesMap.put(clz, standardAttributes);
}
return standardAttributes;
}