diff --git a/spring-webmvc/src/test/java/org/springframework/web/context/XmlWebApplicationContextTests.java b/spring-webmvc/src/test/java/org/springframework/web/context/XmlWebApplicationContextTests.java index 493928a076..aa6de67cdf 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/context/XmlWebApplicationContextTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/context/XmlWebApplicationContextTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -55,7 +55,7 @@ public class XmlWebApplicationContextTests extends AbstractApplicationContextTes root.getEnvironment().addActiveProfile("rootProfile1"); MockServletContext sc = new MockServletContext(""); root.setServletContext(sc); - root.setConfigLocations(new String[] {"/org/springframework/web/context/WEB-INF/applicationContext.xml"}); + root.setConfigLocations("/org/springframework/web/context/WEB-INF/applicationContext.xml"); root.addBeanFactoryPostProcessor(new BeanFactoryPostProcessor() { @Override public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) { @@ -80,7 +80,7 @@ public class XmlWebApplicationContextTests extends AbstractApplicationContextTes wac.setParent(root); wac.setServletContext(sc); wac.setNamespace("test-servlet"); - wac.setConfigLocations(new String[] {"/org/springframework/web/context/WEB-INF/test-servlet.xml"}); + wac.setConfigLocations("/org/springframework/web/context/WEB-INF/test-servlet.xml"); wac.refresh(); return wac; } @@ -120,7 +120,7 @@ public class XmlWebApplicationContextTests extends AbstractApplicationContextTes wac.setParent(root); wac.setServletContext(sc); wac.setNamespace("testNamespace"); - wac.setConfigLocations(new String[] {"/org/springframework/web/context/WEB-INF/test-servlet.xml"}); + wac.setConfigLocations("/org/springframework/web/context/WEB-INF/test-servlet.xml"); wac.refresh(); assertThatExceptionOfType(NoSuchMessageException.class).isThrownBy(() -> wac.getMessage("someMessage", null, Locale.getDefault()));