Object (String modelName, Project project) { Map<String, String> propertiesMap = new LinkedHashMap<>(); for (Map.Entry<String, ?> entry : project.getProperties().entrySet()) { propertiesMap.put(entry.getKey(), Objects.toString(entry.getValue(), null)); } return new ProjectPropertiesImpl(propertiesMap); }