static AutoCloseable tempRestoreMap(Map map) { if (map == null) null; var cloned = cloneMap(map); ret -> copyMap(cloned, map); }