void (@NotNull Element element) { synchronized (myStateMap) { myStateMap.clear(); for (Element child : element.getChildren()) { if (!STATE.equals(child.getName())) continue; // ignore unexpected element long current = System.currentTimeMillis(); long timestamp = StringUtilRt.parseLong(child.getAttributeValue(TIMESTAMP), current); if (TimeUnit.DAYS.toMillis(100) <= (current - timestamp)) continue; // ignore old elements String key = child.getAttributeValue(KEY); if (StringUtilRt.isEmpty(key)) continue; // unexpected key Point location = JDOMUtil.getLocation(child); Dimension size = JDOMUtil.getSize(child); if (location == null && size == null) continue; // unexpected value CachedState state = new CachedState(); state.myLocation = location; state.mySize = size; state.myMaximized = Boolean.parseBoolean(child.getAttributeValue(MAXIMIZED)); state.myFullScreen = Boolean.parseBoolean(child.getAttributeValue(FULL_SCREEN)); state.myScreen = apply(JDOMUtil::getBounds, child.getChild(SCREEN)); state.myTimeStamp = timestamp; myStateMap.put(key, state); } } }