Skip to content

Commit 9bc2c99

Browse files
committed
Suppress deprecation warning in Gradle build
See gh-22181
1 parent 3787b23 commit 9bc2c99

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/test/java/org/springframework/core/env/PropertyPlaceholderConfigurerEnvironmentIntegrationTests.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2014 the original author or authors.
2+
* Copyright 2002-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -19,19 +19,21 @@
1919
import static org.springframework.beans.factory.support.BeanDefinitionBuilder.rootBeanDefinition;
2020

2121
import org.junit.Test;
22-
import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer;
2322
import org.springframework.context.support.GenericApplicationContext;
2423

25-
@SuppressWarnings("resource")
2624
public class PropertyPlaceholderConfigurerEnvironmentIntegrationTests {
25+
2726
@Test
27+
@SuppressWarnings("deprecation")
2828
public void test() {
2929
GenericApplicationContext ctx = new GenericApplicationContext();
3030
ctx.registerBeanDefinition("ppc",
31-
rootBeanDefinition(PropertyPlaceholderConfigurer.class)
31+
rootBeanDefinition(org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.class)
3232
.addPropertyValue("searchSystemEnvironment", false)
3333
.getBeanDefinition());
3434
ctx.refresh();
3535
ctx.getBean("ppc");
36+
ctx.close();
3637
}
38+
3739
}

0 commit comments

Comments
 (0)