// "Replace iteration with bulk 'Map.putAll()' call" "true-preview" import java.util.HashMap; import java.util.Map; class Main extends HashMap { void test() { Map result = new HashMap<>(); for (Map.Entry entry : super.entrySet()) { result.put(entry.getKey(), entry.getValue()); } } }