mirror of
https://github.com/apache/struts.git
synced 2026-08-11 01:27:14 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user