Suppress deprecation warnings in AnnotationProcessorPerformanceTests

This commit is contained in:
Sam Brannen
2018-08-13 12:35:19 +02:00
parent 8126ffbc8c
commit aebbd949a8

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2015 the original author or authors. * Copyright 2002-2018 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@@ -21,11 +21,10 @@ import javax.annotation.Resource;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.junit.Before; import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Required;
import org.springframework.beans.factory.config.RuntimeBeanReference; import org.springframework.beans.factory.config.RuntimeBeanReference;
import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.beans.factory.support.RootBeanDefinition;
@@ -47,8 +46,8 @@ public class AnnotationProcessorPerformanceTests {
private static final Log factoryLog = LogFactory.getLog(DefaultListableBeanFactory.class); private static final Log factoryLog = LogFactory.getLog(DefaultListableBeanFactory.class);
@Before @BeforeClass
public void commonAssumptions() { public static void commonAssumptions() {
Assume.group(TestGroup.PERFORMANCE); Assume.group(TestGroup.PERFORMANCE);
Assume.notLogging(factoryLog); Assume.notLogging(factoryLog);
} }
@@ -143,7 +142,9 @@ public class AnnotationProcessorPerformanceTests {
private static class ResourceAnnotatedTestBean extends TestBean { private static class ResourceAnnotatedTestBean extends TestBean {
@Override @Override
@Resource @Required @Resource
@SuppressWarnings("deprecation")
@org.springframework.beans.factory.annotation.Required
public void setSpouse(ITestBean spouse) { public void setSpouse(ITestBean spouse) {
super.setSpouse(spouse); super.setSpouse(spouse);
} }
@@ -152,7 +153,9 @@ public class AnnotationProcessorPerformanceTests {
private static class AutowiredAnnotatedTestBean extends TestBean { private static class AutowiredAnnotatedTestBean extends TestBean {
@Override @Override
@Autowired @Required @Autowired
@SuppressWarnings("deprecation")
@org.springframework.beans.factory.annotation.Required
public void setSpouse(ITestBean spouse) { public void setSpouse(ITestBean spouse) {
super.setSpouse(spouse); super.setSpouse(spouse);
} }