@Test public void testResolvePropertiesPropertiesProperties() { Properties p1 = new Properties(); p1.setProperty("key1", "value1"); p1.setProperty("key2", "value2"); p1.setProperty("key7", "${key1}"); Map<Object, Object> p1Copy = new HashMap<Object, Object>(p1); Properties p2 = new Properties(); p2.setProperty("key3", "${key1}"); p2.setProperty("key4", "${key2}"); Map<Object, Object> p2Copy = new HashMap<Object, Object>(p2); Properties p3 = PropertiesResolver.resolveProperties(p2, p1); assertEquals(p1Copy, p1); assertEquals(p2Copy, p2); assertEquals("value1", p3.getProperty("key3")); assertEquals("value2", p3.getProperty("key4")); }
public static Properties resolveProperties(Properties properties, Properties resolvedProperties) { if (properties == null) { return null; } return resolveProperties(copyProperties(properties), copyProperties(resolvedProperties), new HashSet<String>(5)); }
PropertiesResolver { public static Properties resolveProperties(Properties properties, Properties resolvedProperties) { if (properties == null) { return null; } return resolveProperties(copyProperties(properties), copyProperties(resolvedProperties), new HashSet<String>(5)); } }
PropertiesResolver { public static Properties resolveProperties(Properties properties, Properties resolvedProperties) { if (properties == null) { return null; } return resolveProperties(copyProperties(properties), copyProperties(resolvedProperties), new HashSet<String>(5)); } private  PropertiesResolver(); }
PropertiesResolver { public static Properties resolveProperties(Properties properties, Properties resolvedProperties) { if (properties == null) { return null; } return resolveProperties(copyProperties(properties), copyProperties(resolvedProperties), new HashSet<String>(5)); } private  PropertiesResolver(); static Properties resolveProperties(Properties properties, Properties resolvedProperties); static Properties resolveProperties(Properties properties); }
PropertiesResolver { public static Properties resolveProperties(Properties properties, Properties resolvedProperties) { if (properties == null) { return null; } return resolveProperties(copyProperties(properties), copyProperties(resolvedProperties), new HashSet<String>(5)); } private  PropertiesResolver(); static Properties resolveProperties(Properties properties, Properties resolvedProperties); static Properties resolveProperties(Properties properties);  }