Преглед на файлове

Fix CsrfBeanDefinitionParserTests Merge

Issue: gh-6423
Rob Winch преди 6 години
родител
ревизия
da17016bbd
променени са 1 файла, в които са добавени 5 реда и са изтрити 5 реда
  1. 5 5
      config/src/test/java/org/springframework/security/config/http/CsrfBeanDefinitionParserTests.java

+ 5 - 5
config/src/test/java/org/springframework/security/config/http/CsrfBeanDefinitionParserTests.java

@@ -28,11 +28,11 @@ public class CsrfBeanDefinitionParserTests {
 
 	@Test
 	public void registerDataValueProcessorOnlyIfNotRegistered() throws Exception {
-		try (ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext()) {
-			context.setAllowBeanDefinitionOverriding(false);
-			context.setConfigLocation(this.xml("RegisterDataValueProcessorOnyIfNotRegistered"));
-			context.refresh();
-		}
+		ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext();
+		context.setAllowBeanDefinitionOverriding(false);
+		context.setConfigLocation(this.xml("RegisterDataValueProcessorOnyIfNotRegistered"));
+		context.refresh();
+		context.close();
 	}
 
 	private String xml(String configName) {