Suppress deprecation warnings in test fixtures

This commit is contained in:
Sam Brannen 2023-08-02 10:51:03 +03:00
parent 900ee11f3b
commit 44d14811d3
2 changed files with 6 additions and 2 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2023 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.
@ -102,6 +102,7 @@ public class DummyFactory
}
@Override
@SuppressWarnings("deprecation")
public void setBeanFactory(BeanFactory beanFactory) {
this.beanFactory = (AutowireCapableBeanFactory) beanFactory;
this.beanFactory.applyBeanPostProcessorsBeforeInitialization(this.testBean, this.beanName);
@ -155,6 +156,7 @@ public class DummyFactory
* @see FactoryBean#getObject()
*/
@Override
@SuppressWarnings("deprecation")
public Object getObject() throws BeansException {
if (isSingleton()) {
return this.testBean;

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2023 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.
@ -103,6 +103,7 @@ public class DummyFactory
}
@Override
@SuppressWarnings("deprecation")
public void setBeanFactory(BeanFactory beanFactory) {
this.beanFactory = (AutowireCapableBeanFactory) beanFactory;
this.beanFactory.applyBeanPostProcessorsBeforeInitialization(this.testBean, this.beanName);
@ -156,6 +157,7 @@ public class DummyFactory
* @see FactoryBean#getObject()
*/
@Override
@SuppressWarnings("deprecation")
public Object getObject() throws BeansException {
if (isSingleton()) {
return this.testBean;