Commit 7fe6e87
committed
fix(retry): drop public Javadoc links to package-private Retry; strip prior interceptor from network chain too; correct backoff range docs
Address Copilot review (PR #1701, review 4247997916):
- BaseS3Client.setMaxRetries and MinioAsyncClient.Builder.maxRetries
Javadocs no longer reference {@link Retry#MAX_RETRY}. The Retry class
is package-private, so the link target was unresolvable from generated
public docs. Replaced with the literal default {@code 10}, which is
what callers actually see.
- BaseS3Client.wrapWithRetry now also strips any prior RetryInterceptor
from networkInterceptors(), not only the application-interceptor list.
Previously the Javadoc claimed every prior RetryInterceptor was
replaced, but only application interceptors were. A caller that had
(mis)registered RetryInterceptor as a network interceptor would have
ended up with two retry layers. Defends against that and brings the
Javadoc claim into line with the code.
- Retry.exponentialBackoffMs Javadoc previously stated the result range
as [0, sleep]. The actual range is [1, sleep] because nextDouble() is
in [0.0, 1.0) and the (long) cast truncates rand * sleep to at most
sleep - 1, so the subtraction never reaches sleep itself. minio-go
has the same off-by-one (Float64() is also [0.0, 1.0)); this is
documented now rather than papered over, so callers reading the
formula see the same bounds the implementation produces.
Validated locally on Java 17:
- :api:check (compile + spotless + spotbugs + tests) PASS
- :api:javadoc PASS1 parent 2f2fb4f commit 7fe6e87
3 files changed
Lines changed: 16 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
141 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
142 | 144 | | |
143 | 145 | | |
144 | 146 | | |
| |||
149 | 151 | | |
150 | 152 | | |
151 | 153 | | |
| 154 | + | |
152 | 155 | | |
153 | 156 | | |
154 | 157 | | |
155 | 158 | | |
156 | 159 | | |
157 | | - | |
| 160 | + | |
158 | 161 | | |
159 | 162 | | |
160 | 163 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
213 | | - | |
| 213 | + | |
| 214 | + | |
214 | 215 | | |
215 | 216 | | |
216 | 217 | | |
| |||
231 | 232 | | |
232 | 233 | | |
233 | 234 | | |
234 | | - | |
| 235 | + | |
235 | 236 | | |
236 | 237 | | |
237 | 238 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
| 117 | + | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
121 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
122 | 126 | | |
123 | 127 | | |
124 | 128 | | |
| |||
0 commit comments