File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed
spring-core/src/main/java/org/springframework/core/metrics Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2020 the original author or authors.
2
+ * Copyright 2002-2021 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
29
29
*/
30
30
class DefaultApplicationStartup implements ApplicationStartup {
31
31
32
+ private static final DefaultStartupStep DEFAULT_STARTUP_STEP = new DefaultStartupStep ();
33
+
32
34
@ Override
33
35
public DefaultStartupStep start (String name ) {
34
- return new DefaultStartupStep () ;
36
+ return DEFAULT_STARTUP_STEP ;
35
37
}
36
38
37
39
38
40
static class DefaultStartupStep implements StartupStep {
39
41
40
- boolean recorded = false ;
41
-
42
42
private final DefaultTags TAGS = new DefaultTags ();
43
43
44
44
@ Override
@@ -63,23 +63,17 @@ public Tags getTags() {
63
63
64
64
@ Override
65
65
public StartupStep tag (String key , String value ) {
66
- if (this .recorded ) {
67
- throw new IllegalArgumentException ();
68
- }
69
66
return this ;
70
67
}
71
68
72
69
@ Override
73
70
public StartupStep tag (String key , Supplier <String > value ) {
74
- if (this .recorded ) {
75
- throw new IllegalArgumentException ();
76
- }
77
71
return this ;
78
72
}
79
73
80
74
@ Override
81
75
public void end () {
82
- this . recorded = true ;
76
+
83
77
}
84
78
85
79
You can’t perform that action at this time.
0 commit comments