Skip to content

Commit 816bbee

Browse files
committed
Remove '.*' imports from tests
Organize test imports to expand all '.*' static imports into fully qualified imports. This update will allow us to use additional checkstyle rules in the future, and will also help if we migrate fully to AssertJ.
1 parent 1b985fb commit 816bbee

1,910 files changed

Lines changed: 8360 additions & 4236 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

spring-aop/src/test/java/org/springframework/aop/aspectj/AspectJAdviceParameterNameDiscovererTests.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2019 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.
@@ -23,7 +23,9 @@
2323

2424
import org.springframework.aop.aspectj.AspectJAdviceParameterNameDiscoverer.AmbiguousBindingException;
2525

26-
import static org.junit.Assert.*;
26+
import static org.junit.Assert.assertEquals;
27+
import static org.junit.Assert.assertNotNull;
28+
import static org.junit.Assert.fail;
2729

2830
/**
2931
* Unit tests for the {@link AspectJAdviceParameterNameDiscoverer} class.

spring-aop/src/test/java/org/springframework/aop/aspectj/AspectJExpressionPointcutTests.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2019 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.
@@ -36,7 +36,10 @@
3636
import org.springframework.tests.sample.beans.TestBean;
3737
import org.springframework.tests.sample.beans.subpkg.DeepBean;
3838

39-
import static org.junit.Assert.*;
39+
import static org.junit.Assert.assertEquals;
40+
import static org.junit.Assert.assertFalse;
41+
import static org.junit.Assert.assertTrue;
42+
import static org.junit.Assert.fail;
4043

4144
/**
4245
* @author Rob Harrop

spring-aop/src/test/java/org/springframework/aop/aspectj/BeanNamePointcutMatchingTests.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2019 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.
@@ -20,7 +20,8 @@
2020

2121
import org.springframework.tests.sample.beans.TestBean;
2222

23-
import static org.junit.Assert.*;
23+
import static org.junit.Assert.assertFalse;
24+
import static org.junit.Assert.assertTrue;
2425

2526
/**
2627
* Tests for matching of bean() pointcut designator.

spring-aop/src/test/java/org/springframework/aop/aspectj/MethodInvocationProceedingJoinPointTests.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2015 the original author or authors.
2+
* Copyright 2002-2019 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.
@@ -37,7 +37,12 @@
3737
import org.springframework.tests.sample.beans.ITestBean;
3838
import org.springframework.tests.sample.beans.TestBean;
3939

40-
import static org.junit.Assert.*;
40+
import static org.junit.Assert.assertEquals;
41+
import static org.junit.Assert.assertFalse;
42+
import static org.junit.Assert.assertNotSame;
43+
import static org.junit.Assert.assertSame;
44+
import static org.junit.Assert.assertTrue;
45+
import static org.junit.Assert.fail;
4146

4247
/**
4348
* @author Rod Johnson

spring-aop/src/test/java/org/springframework/aop/aspectj/TigerAspectJExpressionPointcutTests.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2019 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.
@@ -29,7 +29,8 @@
2929
import org.springframework.aop.framework.ProxyFactory;
3030
import org.springframework.tests.sample.beans.TestBean;
3131

32-
import static org.junit.Assert.*;
32+
import static org.junit.Assert.assertFalse;
33+
import static org.junit.Assert.assertTrue;
3334

3435
/**
3536
* Java 5 specific {@link AspectJExpressionPointcutTests}.

spring-aop/src/test/java/org/springframework/aop/aspectj/TrickyAspectJPointcutExpressionTests.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2016 the original author or authors.
2+
* Copyright 2002-2019 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.
@@ -34,7 +34,8 @@
3434
import org.springframework.core.OverridingClassLoader;
3535
import org.springframework.lang.Nullable;
3636

37-
import static org.junit.Assert.*;
37+
import static org.junit.Assert.assertEquals;
38+
import static org.junit.Assert.fail;
3839

3940
/**
4041
* @author Dave Syer

spring-aop/src/test/java/org/springframework/aop/aspectj/TypePatternClassFilterTests.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-2019 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.
@@ -26,7 +26,8 @@
2626
import org.springframework.tests.sample.beans.TestBean;
2727
import org.springframework.tests.sample.beans.subpkg.DeepBean;
2828

29-
import static org.junit.Assert.*;
29+
import static org.junit.Assert.assertFalse;
30+
import static org.junit.Assert.assertTrue;
3031

3132
/**
3233
* Unit tests for the {@link TypePatternClassFilter} class.

spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AbstractAspectJAdvisorFactoryTests.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,13 @@
5959
import org.springframework.util.ObjectUtils;
6060

6161
import static org.hamcrest.MatcherAssert.assertThat;
62-
import static org.hamcrest.Matchers.*;
63-
import static org.junit.Assert.*;
62+
import static org.hamcrest.Matchers.instanceOf;
63+
import static org.junit.Assert.assertEquals;
64+
import static org.junit.Assert.assertFalse;
65+
import static org.junit.Assert.assertNotSame;
66+
import static org.junit.Assert.assertSame;
67+
import static org.junit.Assert.assertTrue;
68+
import static org.junit.Assert.fail;
6469

6570
/**
6671
* Abstract tests for AspectJAdvisorFactory.

spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/ArgumentBindingTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2016 the original author or authors.
2+
* Copyright 2002-2019 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,7 +30,7 @@
3030
import org.springframework.tests.sample.beans.ITestBean;
3131
import org.springframework.tests.sample.beans.TestBean;
3232

33-
import static org.junit.Assert.*;
33+
import static org.junit.Assert.assertEquals;
3434

3535
/**
3636
* @author Adrian Colyer

spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AspectJPointcutAdvisorTests.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2015 the original author or authors.
2+
* Copyright 2002-2019 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.
@@ -25,7 +25,10 @@
2525
import org.springframework.aop.framework.AopConfigException;
2626
import org.springframework.tests.sample.beans.TestBean;
2727

28-
import static org.junit.Assert.*;
28+
import static org.junit.Assert.assertFalse;
29+
import static org.junit.Assert.assertNotSame;
30+
import static org.junit.Assert.assertSame;
31+
import static org.junit.Assert.assertTrue;
2932

3033
/**
3134
* @author Rod Johnson

0 commit comments

Comments
 (0)