Project

General

Profile

« Previous | Next » 

Revision 98baf5f8

Added by Patrick Plitzner about 6 years ago

fix #6389 Fixed cache loader method

  • the wrong collection size was used for iteration leaving out the second half of map entries

View differences:

eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CacheLoader.java
122 122
            return map;
123 123
        }
124 124

  
125
        int originalMapSize = map.size();
126 125
        Object[] result = new Object[ map.size() * 2 ];
127 126
        Iterator<Map.Entry<T,T>> iter = map.entrySet().iterator();
128 127
        int i=0;
......
142 141
            }
143 142
        }
144 143
        map.clear();
145
        for(i = 0; i < originalMapSize; i+=2 ) {
144
        for(i = 0; i < result.length; i+=2 ) {
146 145
            map.put(
147 146
                    (T)result[i],
148 147
                    (T)result[i+1]

Also available in: Unified diff