@Test public void testRecursion() { Properties properties = new Properties(); properties.setProperty("key1", "value1 ${key3}"); properties.setProperty("key2", "value2 ${key1}"); properties.setProperty("key3", "value3 ${key2}"); properties = PropertiesResolver.resolveProperties(properties); System.out.println(properties.get("key3")); Assert.assertEquals("value3 value2 value1 RECURSION", properties.get("key3")); }
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);  }