void (@NotNull Map<String, Object> props, @NotNull Properties p) { for (Enumeration<?> e = p.propertyNames(); e.hasMoreElements(); ) { String s = (String)e.nextElement(); //noinspection UseOfPropertiesAsHashtable props.putIfAbsent(s, p.containsKey(s) ? p.get(s) : p.getProperty(s)); // pass object for explicit values or string for defaults } }