Closed
Description
The following constructor has a for-loop with a continue statement that seems to do nothing!
It is the line continue; // not parsable, try next style
:
Is there something missing?
LocaleStore(Map<TextStyle, Map<Long, String>> valueTextMap) {
this.valueTextMap = valueTextMap;
Map<TextStyle, List<Entry<String, Long>>> map = new HashMap<TextStyle, List<Entry<String,Long>>>();
List<Entry<String, Long>> allList = new ArrayList<Map.Entry<String,Long>>();
for (TextStyle style : valueTextMap.keySet()) {
Map<String, Entry<String, Long>> reverse = new HashMap<String, Map.Entry<String,Long>>();
for (Map.Entry<Long, String> entry : valueTextMap.get(style).entrySet()) {
if (reverse.put(entry.getValue(), createEntry(entry.getValue(), entry.getKey())) != null) {
continue; // not parsable, try next style
}
}
List<Entry<String, Long>> list = new ArrayList<Map.Entry<String,Long>>(reverse.values());
Collections.sort(list, COMPARATOR);
map.put(style, list);
allList.addAll(list);
map.put(null, allList);
}
Collections.sort(allList, COMPARATOR);
this.parsable = map;
}