#vulnerable code 
                             @Test
	public void freemarkerEngineTest() {
		// 字符串模板
		TemplateEngine engine = new FreemarkerEngine(new TemplateConfig("templates", ResourceMode.STRING));
		Template template = engine.getTemplate("hello,${name}");
		String result = template.render(Dict.create().set("name", "hutool"));
		Assert.assertEquals("hello,hutool", result);
		
		//ClassPath模板
		engine = new FreemarkerEngine(new TemplateConfig("templates", ResourceMode.CLASSPATH));
		template = engine.getTemplate("freemarker_test.ftl");
		result = template.render(Dict.create().set("name", "hutool"));
		Assert.assertEquals("hello,hutool", result);
	} 
                            #location 6 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                             @Test
	public void freemarkerEngineTest() {
		// 字符串模板
		TemplateEngine engine = TemplateUtil.createEngine(
				new TemplateConfig("templates", ResourceMode.STRING).setCustomEngine(FreemarkerEngine.class));
		Template template = engine.getTemplate("hello,${name}");
		String result = template.render(Dict.create().set("name", "hutool"));
		Assert.assertEquals("hello,hutool", result);
		
		//ClassPath模板
		engine = TemplateUtil.createEngine(
				new TemplateConfig("templates", ResourceMode.CLASSPATH).setCustomEngine(FreemarkerEngine.class));
		template = engine.getTemplate("freemarker_test.ftl");
		result = template.render(Dict.create().set("name", "hutool"));
		Assert.assertEquals("hello,hutool", result);
	}