提交 2e91bcb9 编写于 作者: K Kohsuke Kawaguchi

these methods actually return unmodifiable stuff.

上级 bc1fdc17
......@@ -115,7 +115,7 @@ public abstract class AbstractLazyLoadRunMap<R> extends AbstractMap<Integer,R> i
@Override
public Set<Entry<Integer, R>> entrySet() {
return all().entrySet();
return Collections.unmodifiableSet(all().entrySet());
}
public SortedMap<Integer, R> subMap(Integer fromKey, Integer toKey) {
......@@ -130,7 +130,7 @@ public abstract class AbstractLazyLoadRunMap<R> extends AbstractMap<Integer,R> i
assert i!=null;
}
return byNumber.subMap(fromKey,toKey);
return Collections.unmodifiableSortedMap(byNumber.subMap(fromKey,toKey));
}
public SortedMap<Integer, R> headMap(Integer toKey) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册