Skip to content

Commit 40449e2

Browse files
committed
Suppress warnings in tests
This commit suppresses warnings in test classes that were polluting the Gradle build output.
1 parent 27b4909 commit 40449e2

File tree

5 files changed

+9
-5
lines changed

5 files changed

+9
-5
lines changed

spring-orm-hibernate4/src/test/java/org/springframework/orm/jpa/jpa21/PersistenceContextTransactionTests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
* @author Juergen Hoeller
4646
* @since 4.1.2
4747
*/
48+
@SuppressWarnings({ "rawtypes", "unchecked" })
4849
public class PersistenceContextTransactionTests {
4950

5051
private EntityManagerFactory factory;
@@ -72,6 +73,7 @@ public void setUp() throws Exception {
7273
given(manager.isOpen()).willReturn(true);
7374

7475
bean = new EntityManagerHoldingBean();
76+
@SuppressWarnings("serial")
7577
PersistenceAnnotationBeanPostProcessor pabpp = new PersistenceAnnotationBeanPostProcessor() {
7678
@Override
7779
protected EntityManagerFactory findEntityManagerFactory(String unitName, String requestingBeanName) {

spring-orm/src/test/java/org/springframework/orm/jpa/support/PersistenceContextTransactionTests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
* @author Juergen Hoeller
4141
* @since 4.1.2
4242
*/
43+
@SuppressWarnings({ "rawtypes", "unchecked" })
4344
public class PersistenceContextTransactionTests {
4445

4546
private EntityManagerFactory factory;
@@ -67,6 +68,7 @@ public void setUp() throws Exception {
6768
given(manager.isOpen()).willReturn(true);
6869

6970
bean = new EntityManagerHoldingBean();
71+
@SuppressWarnings("serial")
7072
PersistenceAnnotationBeanPostProcessor pabpp = new PersistenceAnnotationBeanPostProcessor() {
7173
@Override
7274
protected EntityManagerFactory findEntityManagerFactory(String unitName, String requestingBeanName) {

spring-web/src/test/java/org/springframework/web/client/HttpMessageConverterExtractorTests.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ public void cannotRead() throws IOException {
126126
}
127127

128128
@Test
129+
@SuppressWarnings("unchecked")
129130
public void connectionClose() throws IOException {
130131
HttpMessageConverter<String> converter = mock(HttpMessageConverter.class);
131132
List<HttpMessageConverter<?>> converters = new ArrayList<HttpMessageConverter<?>>();

spring-webmvc-tiles2/src/test/java/org/springframework/web/servlet/view/tiles2/TilesConfigurerTests.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2013 the original author or authors.
2+
* Copyright 2002-2014 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.
@@ -30,10 +30,11 @@
3030

3131
/**
3232
* @author Juergen Hoeller
33-
* */
33+
*/
3434
public class TilesConfigurerTests {
3535

3636
@Test
37+
@SuppressWarnings("deprecation")
3738
public void simpleBootstrap() {
3839
MockServletContext sc = new MockServletContext();
3940
TilesConfigurer tc = new TilesConfigurer();

src/test/java/org/springframework/context/annotation/ltw/ComponentScanningWithLTWTests.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,14 @@
1616

1717
package org.springframework.context.annotation.ltw;
1818

19-
import org.springframework.test.jpa.AbstractJpaTests;
20-
2119
/**
2220
* Test to ensure that component scanning work with load-time weaver.
2321
* See SPR-3873 for more details.
2422
*
2523
* @author Ramnivas Laddad
2624
*/
2725
@SuppressWarnings("deprecation")
28-
public class ComponentScanningWithLTWTests extends AbstractJpaTests {
26+
public class ComponentScanningWithLTWTests extends org.springframework.test.jpa.AbstractJpaTests {
2927

3028
public ComponentScanningWithLTWTests() {
3129
setDependencyCheck(false);

0 commit comments

Comments
 (0)