From 9bc2c99ce5e08b8cf24ba7fbdd23c7ca320102bf Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Wed, 6 Feb 2019 16:37:23 +0100 Subject: [PATCH] Suppress deprecation warning in Gradle build See gh-22181 --- ...aceholderConfigurerEnvironmentIntegrationTests.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/test/java/org/springframework/core/env/PropertyPlaceholderConfigurerEnvironmentIntegrationTests.java b/src/test/java/org/springframework/core/env/PropertyPlaceholderConfigurerEnvironmentIntegrationTests.java index fb95406498c..9f6d572eaca 100644 --- a/src/test/java/org/springframework/core/env/PropertyPlaceholderConfigurerEnvironmentIntegrationTests.java +++ b/src/test/java/org/springframework/core/env/PropertyPlaceholderConfigurerEnvironmentIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2014 the original author or authors. + * Copyright 2002-2019 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. @@ -19,19 +19,21 @@ package org.springframework.core.env; import static org.springframework.beans.factory.support.BeanDefinitionBuilder.rootBeanDefinition; import org.junit.Test; -import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer; import org.springframework.context.support.GenericApplicationContext; -@SuppressWarnings("resource") public class PropertyPlaceholderConfigurerEnvironmentIntegrationTests { + @Test + @SuppressWarnings("deprecation") public void test() { GenericApplicationContext ctx = new GenericApplicationContext(); ctx.registerBeanDefinition("ppc", - rootBeanDefinition(PropertyPlaceholderConfigurer.class) + rootBeanDefinition(org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.class) .addPropertyValue("searchSystemEnvironment", false) .getBeanDefinition()); ctx.refresh(); ctx.getBean("ppc"); + ctx.close(); } + }