Fixes: https://github.com/spring-projects/spring-retry/issues/476
* Add `maven-assembly-plugin` to Zip Javadocs from the `apidocs` dir into a `*-docs.zip` artifact
* Modify `build-and-deploy-snapshot.yml` and `release.yml` to assign `zip.deployed=false` attribute to Zip artifacts
* Also mark `docs.zip` files as `zip.type=docs`
Due to the absence of a `hashCode()` implementation, proxies for the `AnnotationClassOrMethodPointcut` class are regenerated each time,
which causes them to be stored in the `org.springframework.cglib.core.internal.LoadingCache` (with `RetryConfiguration.AnnotationClassOrMethodPointcut` being part of the composite key for this object).
This results in an excessive accumulation of generated proxies in memory, ultimately leading to metaspace overflow.
GH-470: Add `RetryTemplate.setLogger()` to avoid reflection in other places
Fixes: #470
Issue link: https://github.com/spring-projects/spring-retry/issues/470
Spring Cloud Config does mutation in the `RetryTemplate` for its system loading logger via `RetryTemplateFactory`.
* Expose setter for `logger` property to avoid reflection.
* Add `RetryTemplateBuilder.withLogger()` for convenience
Fixes: #229
Issue link: https://github.com/spring-projects/spring-retry/issues/229
The logic in the target `RetryPolicy` might be based on the method and its arguments we retry.
* Expose `method` & `methodArgs` `RetryContext` attributes from an internal implementation
of the `MethodInvocationRetryCallback` in the `RetryOperationsInterceptor`
* Document these attributes
Looks like that was a copy/paste artifact.
The `@Recover` is for business method purpose.
The `@Import(RetryConfiguration.class)` is done from the `@EnableRetry`
Fixes: #464
Issue link: https://github.com/spring-projects/spring-retry/issues/464
When `maxBackOffPeriod` is less than `minBackOffPeriod`, delta is taken
taken as zero in `UniformRandomBackOffPolicy` `backOff()` method.
* Update tests to use `DummySleeper`
* Extract `UniformRandomBackOffPolicy` `backOffSuppliers` into local variables
* Modify `UniformRandomBackOffPolicy` tests
Fixes: #458
* Fix code formatting violations
* * Make `retryContextToSample` as an `IdentityHashMap` and use `RetryContext` as a key
* Change `setCustomTags()` to the `@Nullable Iterable<Tag>` argument
* Use `exception = none` tag for successful executions to avoid time-series conflicts
* Add @Nullable in RetryContext to easier detect possible NPE
Both getParent() and getLastThrowable() might return null, as mentioned
in javadoc. @Nullable helps an IDE warns developers about potential NPE.
* Rephrase Javadoc for RetryContext.getLastThrowable()
* Review fixes
Fixes: #456
The random logic in the `ExponentialRandomBackOffPolicy` may end up with close to the `1`.
And after casting to `long` we got the same `1000`
* Fix test respectively to include that possibility.
Fixes: #441
* Replace `Classifier` with more widely used `Predicate` in `RetryTemplateBuilder`
* Introduce `PredicateRetryPolicy` to avoid backward incompatible changes