Suppress warnings in tests

This commit suppresses warnings in test classes that were polluting the
Gradle build output.
This commit is contained in:
Sam Brannen
2014-12-31 02:10:30 +01:00
parent 27b4909f46
commit 40449e2741
5 changed files with 9 additions and 5 deletions

View File

@@ -45,6 +45,7 @@ import static org.mockito.BDDMockito.*;
* @author Juergen Hoeller
* @since 4.1.2
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
public class PersistenceContextTransactionTests {
private EntityManagerFactory factory;
@@ -72,6 +73,7 @@ public class PersistenceContextTransactionTests {
given(manager.isOpen()).willReturn(true);
bean = new EntityManagerHoldingBean();
@SuppressWarnings("serial")
PersistenceAnnotationBeanPostProcessor pabpp = new PersistenceAnnotationBeanPostProcessor() {
@Override
protected EntityManagerFactory findEntityManagerFactory(String unitName, String requestingBeanName) {

View File

@@ -40,6 +40,7 @@ import static org.mockito.BDDMockito.*;
* @author Juergen Hoeller
* @since 4.1.2
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
public class PersistenceContextTransactionTests {
private EntityManagerFactory factory;
@@ -67,6 +68,7 @@ public class PersistenceContextTransactionTests {
given(manager.isOpen()).willReturn(true);
bean = new EntityManagerHoldingBean();
@SuppressWarnings("serial")
PersistenceAnnotationBeanPostProcessor pabpp = new PersistenceAnnotationBeanPostProcessor() {
@Override
protected EntityManagerFactory findEntityManagerFactory(String unitName, String requestingBeanName) {

View File

@@ -126,6 +126,7 @@ public class HttpMessageConverterExtractorTests {
}
@Test
@SuppressWarnings("unchecked")
public void connectionClose() throws IOException {
HttpMessageConverter<String> converter = mock(HttpMessageConverter.class);
List<HttpMessageConverter<?>> converters = new ArrayList<HttpMessageConverter<?>>();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2014 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.
@@ -30,10 +30,11 @@ import static org.junit.Assert.*;
/**
* @author Juergen Hoeller
* */
*/
public class TilesConfigurerTests {
@Test
@SuppressWarnings("deprecation")
public void simpleBootstrap() {
MockServletContext sc = new MockServletContext();
TilesConfigurer tc = new TilesConfigurer();

View File

@@ -16,8 +16,6 @@
package org.springframework.context.annotation.ltw;
import org.springframework.test.jpa.AbstractJpaTests;
/**
* Test to ensure that component scanning work with load-time weaver.
* See SPR-3873 for more details.
@@ -25,7 +23,7 @@ import org.springframework.test.jpa.AbstractJpaTests;
* @author Ramnivas Laddad
*/
@SuppressWarnings("deprecation")
public class ComponentScanningWithLTWTests extends AbstractJpaTests {
public class ComponentScanningWithLTWTests extends org.springframework.test.jpa.AbstractJpaTests {
public ComponentScanningWithLTWTests() {
setDependencyCheck(false);