- htmlEntryIndices = new int[size];
- for (int i = 0; i < size; ++i) {
- htmlEntryIndices[i] = StringUtil.readVarInt(raf);
- }
- this.htmlEntries = CachingList.create(new AbstractList<HtmlEntry>() {
- @Override
- public HtmlEntry get(int i) {
- return index.dict.htmlEntries.get(htmlEntryIndices[i]);
+ if (size == 0) {
+ this.htmlEntries = Collections.emptyList();
+ } else {
+ final int[] htmlEntryIndices = new int[size];
+ for (int i = 0; i < size; ++i) {
+ htmlEntryIndices[i] = StringUtil.readVarInt(raf);