File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed
spring-integration-core/src/main/java/org/springframework/integration/util Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change 35
35
*
36
36
* @author Gunnar Hillert
37
37
* @author Gary Russell
38
+ * @author Artem Bilan
38
39
*
39
40
* @since 4.2
40
41
*/
41
42
public class DynamicPeriodicTrigger implements Trigger {
42
43
43
- private volatile Duration initialDuration = Duration .ofMillis (0 );
44
+ private Duration initialDuration = Duration .ofMillis (0 );
44
45
45
- private volatile Duration duration ;
46
+ private Duration duration ;
46
47
47
- private volatile TimeUnit timeUnit = TimeUnit .MILLISECONDS ;
48
-
49
- private volatile boolean fixedRate = false ;
48
+ private boolean fixedRate = false ;
50
49
51
50
/**
52
51
* Create a trigger with the given period in milliseconds. The underlying
@@ -177,14 +176,11 @@ else if (!this.duration.equals(other.duration)) {
177
176
return false ;
178
177
}
179
178
if (this .initialDuration == null ) {
180
- if (other .initialDuration != null ) {
181
- return false ;
182
- }
179
+ return other .initialDuration == null ;
183
180
}
184
- else if (! this . initialDuration . equals ( other . initialDuration )) {
185
- return false ;
181
+ else {
182
+ return this . initialDuration . equals ( other . initialDuration ) ;
186
183
}
187
- return true ;
188
184
}
189
185
190
186
You can’t perform that action at this time.
0 commit comments