I wouldn't worry about this one. This method won't be called very
often, and isn't likely to contain much data even when it is.
On Aug 3, 2009, at 11:28 AM, Sandro Martini wrote:
Hi to all,
take a look at this, taken from WTKXSerializer (inside its inner class
NamedObjectBindings):
public void putAll(Map<? extends String, ? extends Object>
map) {
// original
// for (String key : map.keySet()) {
// put(key, map.get(key));
// }
// TODO: new, test before ...
Set<? extends Map.Entry<? extends String, ? extends
Object>> set = map.entrySet();
for (Map.Entry<? extends String, ? extends Object>
entry : set) {
put(entry.getKey(), entry.getValue());
}
}
What do you think ?
The original version is ok, but doesn't use the (more efficient)
entrySet of Map, maybe useful as a reference also for other parts in
sources ...
I'm sorry but at the moment I have tried only to run some of tests, al
all seems to work, but maybe some deeper tests are required here.
Part of this Generics trick is taken from here:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6231312
Tell me something.
Bye,
Sandro