@Test public void undefinedField() throws Exception { assertThat( engine.eval(newConfig().set("key", "${timezone.no_such_field}"), params()) .get("key", String.class), is("")); }
protected Config eval(Config config, Config params) throws TemplateException { ObjectNode object = config.convert(ObjectNode.class); ObjectNode built = new Context(params).evalObjectRecursive(object); return config.getFactory().create(built); }
ConfigEvalEngine implements TemplateEngine { protected Config eval(Config config, Config params) throws TemplateException { ObjectNode object = config.convert(ObjectNode.class); ObjectNode built = new Context(params).evalObjectRecursive(object); return config.getFactory().create(built); } }
ConfigEvalEngine implements TemplateEngine { protected Config eval(Config config, Config params) throws TemplateException { ObjectNode object = config.convert(ObjectNode.class); ObjectNode built = new Context(params).evalObjectRecursive(object); return config.getFactory().create(built); } @Inject  ConfigEvalEngine(); }
ConfigEvalEngine implements TemplateEngine { protected Config eval(Config config, Config params) throws TemplateException { ObjectNode object = config.convert(ObjectNode.class); ObjectNode built = new Context(params).evalObjectRecursive(object); return config.getFactory().create(built); } @Inject  ConfigEvalEngine(); @Override String template(String content, Config params); }
ConfigEvalEngine implements TemplateEngine { protected Config eval(Config config, Config params) throws TemplateException { ObjectNode object = config.convert(ObjectNode.class); ObjectNode built = new Context(params).evalObjectRecursive(object); return config.getFactory().create(built); } @Inject  ConfigEvalEngine(); @Override String template(String content, Config params);  }