@Test public void detectCircularReferences5() { context.putProperty("A", "${B} and ${C}"); context.putProperty("B", "${B1}"); context.putProperty("B1", "B1-value"); context.putProperty("C", "${C1}"); context.putProperty("C1", "here's the loop: ${A}"); expectedException.expect(IllegalArgumentException.class); expectedException.expectMessage("Circular variable reference detected while parsing input [${A} --> ${C} --> ${C1} --> ${A}]"); String result = OptionHelper.substVars("${A}", context); System.err.println(result); }
public static String substVars(String val, PropertyContainer pc1) { return substVars(val, pc1, null); }
OptionHelper { public static String substVars(String val, PropertyContainer pc1) { return substVars(val, pc1, null); } }
OptionHelper { public static String substVars(String val, PropertyContainer pc1) { return substVars(val, pc1, null); }  }
OptionHelper { public static String substVars(String val, PropertyContainer pc1) { return substVars(val, pc1, null); }  static Object instantiateByClassName(String className, Class<?> superClass, Context context); static Object instantiateByClassNameAndParameter(String className, Class<?> superClass, Context context, Class<?> type, Object param); static Object instantiateByClassName(String className, Class<?> superClass, ClassLoader classLoader); static Object instantiateByClassNameAndParameter(String className, Class<?> superClass, ClassLoader classLoader, Class<?> type, Object parameter); static String substVars(String val, PropertyContainer pc1); static String substVars(String input, PropertyContainer pc0, PropertyContainer pc1); static String propertyLookup(String key, PropertyContainer pc1, PropertyContainer pc2); static String getSystemProperty(String key, String def); static String getEnv(String key); static String getSystemProperty(String key); static void setSystemProperties(ContextAware contextAware, Properties props); static void setSystemProperty(ContextAware contextAware, String key, String value); static Properties getSystemProperties(); static String[] extractDefaultReplacement(String key); static boolean toBoolean(String value, boolean dEfault); static boolean isNullOrEmpty(@Nullable String str); }
OptionHelper { public static String substVars(String val, PropertyContainer pc1) { return substVars(val, pc1, null); }  static Object instantiateByClassName(String className, Class<?> superClass, Context context); static Object instantiateByClassNameAndParameter(String className, Class<?> superClass, Context context, Class<?> type, Object param); static Object instantiateByClassName(String className, Class<?> superClass, ClassLoader classLoader); static Object instantiateByClassNameAndParameter(String className, Class<?> superClass, ClassLoader classLoader, Class<?> type, Object parameter); static String substVars(String val, PropertyContainer pc1); static String substVars(String input, PropertyContainer pc0, PropertyContainer pc1); static String propertyLookup(String key, PropertyContainer pc1, PropertyContainer pc2); static String getSystemProperty(String key, String def); static String getEnv(String key); static String getSystemProperty(String key); static void setSystemProperties(ContextAware contextAware, Properties props); static void setSystemProperty(ContextAware contextAware, String key, String value); static Properties getSystemProperties(); static String[] extractDefaultReplacement(String key); static boolean toBoolean(String value, boolean dEfault); static boolean isNullOrEmpty(@Nullable String str);  }