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 3535 *
3636 * @author Gunnar Hillert
3737 * @author Gary Russell
38+ * @author Artem Bilan
3839 *
3940 * @since 4.2
4041 */
4142public class DynamicPeriodicTrigger implements Trigger {
4243
43- private volatile Duration initialDuration = Duration .ofMillis (0 );
44+ private Duration initialDuration = Duration .ofMillis (0 );
4445
45- private volatile Duration duration ;
46+ private Duration duration ;
4647
47- private volatile TimeUnit timeUnit = TimeUnit .MILLISECONDS ;
48-
49- private volatile boolean fixedRate = false ;
48+ private boolean fixedRate = false ;
5049
5150 /**
5251 * Create a trigger with the given period in milliseconds. The underlying
@@ -177,14 +176,11 @@ else if (!this.duration.equals(other.duration)) {
177176 return false ;
178177 }
179178 if (this .initialDuration == null ) {
180- if (other .initialDuration != null ) {
181- return false ;
182- }
179+ return other .initialDuration == null ;
183180 }
184- else if (! this . initialDuration . equals ( other . initialDuration )) {
185- return false ;
181+ else {
182+ return this . initialDuration . equals ( other . initialDuration ) ;
186183 }
187- return true ;
188184 }
189185
190186
You can’t perform that action at this time.
0 commit comments