diff --git a/src/main/java/org/springframework/retry/backoff/ExponentialBackOffPolicy.java b/src/main/java/org/springframework/retry/backoff/ExponentialBackOffPolicy.java index 3baa4ac..155101c 100644 --- a/src/main/java/org/springframework/retry/backoff/ExponentialBackOffPolicy.java +++ b/src/main/java/org/springframework/retry/backoff/ExponentialBackOffPolicy.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2020 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,6 +38,7 @@ import org.springframework.util.ClassUtils; * @author Dave Syer * @author Gary Russell * @author Artem Bilan + * @author Marius Lichtblau */ @SuppressWarnings("serial") public class ExponentialBackOffPolicy implements SleepingBackOffPolicy { @@ -179,6 +180,7 @@ public class ExponentialBackOffPolicy implements SleepingBackOffPolicy { @@ -82,6 +83,7 @@ public class FixedBackOffPolicy extends StatelessBackOffPolicy implements Sleepi sleeper.sleep(backOffPeriod); } catch (InterruptedException e) { + Thread.currentThread().interrupt(); throw new BackOffInterruptedException("Thread interrupted while sleeping", e); } } diff --git a/src/main/java/org/springframework/retry/backoff/UniformRandomBackOffPolicy.java b/src/main/java/org/springframework/retry/backoff/UniformRandomBackOffPolicy.java index d03b68e..c8fd3e1 100644 --- a/src/main/java/org/springframework/retry/backoff/UniformRandomBackOffPolicy.java +++ b/src/main/java/org/springframework/retry/backoff/UniformRandomBackOffPolicy.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,6 +29,7 @@ import java.util.Random; * @author Rob Harrop * @author Dave Syer * @author Tomaz Fernandes + * @author Marius Lichtblau */ public class UniformRandomBackOffPolicy extends StatelessBackOffPolicy implements SleepingBackOffPolicy { @@ -112,6 +113,7 @@ public class UniformRandomBackOffPolicy extends StatelessBackOffPolicy sleeper.sleep(minBackOffPeriod + delta); } catch (InterruptedException e) { + Thread.currentThread().interrupt(); throw new BackOffInterruptedException("Thread interrupted while sleeping", e); } } diff --git a/src/test/java/org/springframework/retry/backoff/ExponentialBackOffPolicyTests.java b/src/test/java/org/springframework/retry/backoff/ExponentialBackOffPolicyTests.java index faba542..44144a9 100644 --- a/src/test/java/org/springframework/retry/backoff/ExponentialBackOffPolicyTests.java +++ b/src/test/java/org/springframework/retry/backoff/ExponentialBackOffPolicyTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,6 +24,7 @@ import org.junit.Test; /** * @author Rob Harrop * @author Dave Syer + * @author Marius Lichtblau */ public class ExponentialBackOffPolicyTests { diff --git a/src/test/java/org/springframework/retry/backoff/FixedBackOffPolicyTests.java b/src/test/java/org/springframework/retry/backoff/FixedBackOffPolicyTests.java index 8a372fe..ef5ff40 100644 --- a/src/test/java/org/springframework/retry/backoff/FixedBackOffPolicyTests.java +++ b/src/test/java/org/springframework/retry/backoff/FixedBackOffPolicyTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,6 +23,7 @@ import org.junit.Test; /** * @author Rob Harrop * @author Dave Syer + * @author Marius Lichtblau * @since 2.1 */ public class FixedBackOffPolicyTests { diff --git a/src/test/java/org/springframework/retry/backoff/UniformRandomBackOffPolicyTests.java b/src/test/java/org/springframework/retry/backoff/UniformRandomBackOffPolicyTests.java index d3922bb..409b358 100644 --- a/src/test/java/org/springframework/retry/backoff/UniformRandomBackOffPolicyTests.java +++ b/src/test/java/org/springframework/retry/backoff/UniformRandomBackOffPolicyTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2022 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,6 +22,7 @@ import org.junit.Test; /** * @author Tomaz Fernandes + * @author Marius Lichtblau * @since 1.3.2 */ public class UniformRandomBackOffPolicyTests {