File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
spring-test/src/main/java/org/springframework/test/context/support Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 30
30
*/
31
31
class MergedTestPropertySources {
32
32
33
- private static final String [] EMPTY_STRING_ARRAY = new String [0 ];
33
+ private static final MergedTestPropertySources empty = new MergedTestPropertySources ( new String [0 ], new String [ 0 ]) ;
34
34
35
35
private final String [] locations ;
36
36
37
37
private final String [] properties ;
38
38
39
39
40
40
/**
41
- * Create an <em>empty</em> {@code MergedTestPropertySources} instance.
41
+ * Factory for an <em>empty</em> {@code MergedTestPropertySources} instance.
42
42
*/
43
- MergedTestPropertySources () {
44
- this ( EMPTY_STRING_ARRAY , EMPTY_STRING_ARRAY ) ;
43
+ static MergedTestPropertySources empty () {
44
+ return empty ;
45
45
}
46
46
47
+
47
48
/**
48
49
* Create a {@code MergedTestPropertySources} instance with the supplied
49
50
* {@code locations} and {@code properties}.
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ public abstract class TestPropertySourceUtils {
92
92
static MergedTestPropertySources buildMergedTestPropertySources (Class <?> testClass ) {
93
93
MergedAnnotations mergedAnnotations = MergedAnnotations .from (testClass , SearchStrategy .EXHAUSTIVE );
94
94
return (mergedAnnotations .isPresent (TestPropertySource .class ) ? mergeTestPropertySources (mergedAnnotations ) :
95
- new MergedTestPropertySources ());
95
+ MergedTestPropertySources . empty ());
96
96
}
97
97
98
98
private static MergedTestPropertySources mergeTestPropertySources (MergedAnnotations mergedAnnotations ) {
You can’t perform that action at this time.
0 commit comments