Skip to content

Commit 597f755

Browse files
committed
Code style fixes
1 parent 8d08477 commit 597f755

File tree

3 files changed

+44
-44
lines changed

3 files changed

+44
-44
lines changed

src/main/java/net/tascalate/concurrent/DelayPolicy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public interface DelayPolicy {
3434
public static final DelayPolicy DEFAULT = new FirstRetryNoDelayPolicy(new FixedIntervalDelayPolicy());
3535
public static final DelayPolicy INVALID = ctx -> -1;
3636

37-
abstract public long delayMillis(RetryContext context);
37+
long delayMillis(RetryContext context);
3838

3939
public static DelayPolicy fixedInterval() {
4040
return new FixedIntervalDelayPolicy();

src/main/java/net/tascalate/concurrent/Promise.java

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@
4141
*/
4242
public interface Promise<T> extends Future<T>, CompletionStage<T> {
4343

44-
default public T getNow(T valueIfAbsent) {
44+
default T getNow(T valueIfAbsent) {
4545
return getNow(() -> valueIfAbsent);
4646
}
4747

48-
default public T getNow(Supplier<? extends T> valueIfAbsent) {
48+
default T getNow(Supplier<? extends T> valueIfAbsent) {
4949
if (isDone()) {
5050
try {
5151
return get();
@@ -138,86 +138,86 @@ default DependentPromise<T> dependent() {
138138
return DependentPromise.from(this);
139139
}
140140

141-
public <U> Promise<U> thenApply(Function<? super T, ? extends U> fn);
141+
<U> Promise<U> thenApply(Function<? super T, ? extends U> fn);
142142

143-
public <U> Promise<U> thenApplyAsync(Function<? super T, ? extends U> fn);
143+
<U> Promise<U> thenApplyAsync(Function<? super T, ? extends U> fn);
144144

145-
public <U> Promise<U> thenApplyAsync(Function<? super T, ? extends U> fn, Executor executor);
145+
<U> Promise<U> thenApplyAsync(Function<? super T, ? extends U> fn, Executor executor);
146146

147-
public Promise<Void> thenAccept(Consumer<? super T> action);
147+
Promise<Void> thenAccept(Consumer<? super T> action);
148148

149-
public Promise<Void> thenAcceptAsync(Consumer<? super T> action);
149+
Promise<Void> thenAcceptAsync(Consumer<? super T> action);
150150

151-
public Promise<Void> thenAcceptAsync(Consumer<? super T> action, Executor executor);
151+
Promise<Void> thenAcceptAsync(Consumer<? super T> action, Executor executor);
152152

153-
public Promise<Void> thenRun(Runnable action);
153+
Promise<Void> thenRun(Runnable action);
154154

155-
public Promise<Void> thenRunAsync(Runnable action);
155+
Promise<Void> thenRunAsync(Runnable action);
156156

157-
public Promise<Void> thenRunAsync(Runnable action, Executor executor);
157+
Promise<Void> thenRunAsync(Runnable action, Executor executor);
158158

159-
public <U, V> Promise<V> thenCombine(CompletionStage<? extends U> other, BiFunction<? super T, ? super U, ? extends V> fn);
159+
<U, V> Promise<V> thenCombine(CompletionStage<? extends U> other, BiFunction<? super T, ? super U, ? extends V> fn);
160160

161-
public <U, V> Promise<V> thenCombineAsync(CompletionStage<? extends U> other, BiFunction<? super T, ? super U, ? extends V> fn);
161+
<U, V> Promise<V> thenCombineAsync(CompletionStage<? extends U> other, BiFunction<? super T, ? super U, ? extends V> fn);
162162

163-
public <U, V> Promise<V> thenCombineAsync(CompletionStage<? extends U> other,
163+
<U, V> Promise<V> thenCombineAsync(CompletionStage<? extends U> other,
164164
BiFunction<? super T, ? super U, ? extends V> fn,
165165
Executor executor);
166166

167-
public <U> Promise<Void> thenAcceptBoth(CompletionStage<? extends U> other, BiConsumer<? super T, ? super U> action);
167+
<U> Promise<Void> thenAcceptBoth(CompletionStage<? extends U> other, BiConsumer<? super T, ? super U> action);
168168

169-
public <U> Promise<Void> thenAcceptBothAsync(CompletionStage<? extends U> other, BiConsumer<? super T, ? super U> action);
169+
<U> Promise<Void> thenAcceptBothAsync(CompletionStage<? extends U> other, BiConsumer<? super T, ? super U> action);
170170

171-
public <U> Promise<Void> thenAcceptBothAsync(CompletionStage<? extends U> other,
171+
<U> Promise<Void> thenAcceptBothAsync(CompletionStage<? extends U> other,
172172
BiConsumer<? super T, ? super U> action,
173173
Executor executor);
174174

175-
public Promise<Void> runAfterBoth(CompletionStage<?> other, Runnable action);
175+
Promise<Void> runAfterBoth(CompletionStage<?> other, Runnable action);
176176

177-
public Promise<Void> runAfterBothAsync(CompletionStage<?> other, Runnable action);
177+
Promise<Void> runAfterBothAsync(CompletionStage<?> other, Runnable action);
178178

179-
public Promise<Void> runAfterBothAsync(CompletionStage<?> other, Runnable action, Executor executor);
179+
Promise<Void> runAfterBothAsync(CompletionStage<?> other, Runnable action, Executor executor);
180180

181-
public <U> Promise<U> applyToEither(CompletionStage<? extends T> other, Function<? super T, U> fn);
181+
<U> Promise<U> applyToEither(CompletionStage<? extends T> other, Function<? super T, U> fn);
182182

183-
public <U> Promise<U> applyToEitherAsync(CompletionStage<? extends T> other, Function<? super T, U> fn);
183+
<U> Promise<U> applyToEitherAsync(CompletionStage<? extends T> other, Function<? super T, U> fn);
184184

185-
public <U> Promise<U> applyToEitherAsync(CompletionStage<? extends T> other,
185+
<U> Promise<U> applyToEitherAsync(CompletionStage<? extends T> other,
186186
Function<? super T, U> fn,
187187
Executor executor);
188188

189-
public Promise<Void> acceptEither(CompletionStage<? extends T> other, Consumer<? super T> action);
189+
Promise<Void> acceptEither(CompletionStage<? extends T> other, Consumer<? super T> action);
190190

191-
public Promise<Void> acceptEitherAsync(CompletionStage<? extends T> other, Consumer<? super T> action);
191+
Promise<Void> acceptEitherAsync(CompletionStage<? extends T> other, Consumer<? super T> action);
192192

193-
public Promise<Void> acceptEitherAsync(CompletionStage<? extends T> other,
193+
Promise<Void> acceptEitherAsync(CompletionStage<? extends T> other,
194194
Consumer<? super T> action,
195195
Executor executor);
196196

197-
public Promise<Void> runAfterEither(CompletionStage<?> other, Runnable action);
197+
Promise<Void> runAfterEither(CompletionStage<?> other, Runnable action);
198198

199-
public Promise<Void> runAfterEitherAsync(CompletionStage<?> other, Runnable action);
199+
Promise<Void> runAfterEitherAsync(CompletionStage<?> other, Runnable action);
200200

201-
public Promise<Void> runAfterEitherAsync(CompletionStage<?> other, Runnable action, Executor executor);
201+
Promise<Void> runAfterEitherAsync(CompletionStage<?> other, Runnable action, Executor executor);
202202

203-
public <U> Promise<U> thenCompose(Function<? super T, ? extends CompletionStage<U>> fn);
203+
<U> Promise<U> thenCompose(Function<? super T, ? extends CompletionStage<U>> fn);
204204

205-
public <U> Promise<U> thenComposeAsync(Function<? super T, ? extends CompletionStage<U>> fn);
205+
<U> Promise<U> thenComposeAsync(Function<? super T, ? extends CompletionStage<U>> fn);
206206

207-
public <U> Promise<U> thenComposeAsync(Function<? super T, ? extends CompletionStage<U>> fn, Executor executor);
207+
<U> Promise<U> thenComposeAsync(Function<? super T, ? extends CompletionStage<U>> fn, Executor executor);
208208

209-
public Promise<T> exceptionally(Function<Throwable, ? extends T> fn);
209+
Promise<T> exceptionally(Function<Throwable, ? extends T> fn);
210210

211-
public Promise<T> whenComplete(BiConsumer<? super T, ? super Throwable> action);
211+
Promise<T> whenComplete(BiConsumer<? super T, ? super Throwable> action);
212212

213-
public Promise<T> whenCompleteAsync(BiConsumer<? super T, ? super Throwable> action);
213+
Promise<T> whenCompleteAsync(BiConsumer<? super T, ? super Throwable> action);
214214

215-
public Promise<T> whenCompleteAsync(BiConsumer<? super T, ? super Throwable> action, Executor executor);
215+
Promise<T> whenCompleteAsync(BiConsumer<? super T, ? super Throwable> action, Executor executor);
216216

217-
public <U> Promise<U> handle(BiFunction<? super T, Throwable, ? extends U> fn);
217+
<U> Promise<U> handle(BiFunction<? super T, Throwable, ? extends U> fn);
218218

219-
public <U> Promise<U> handleAsync(BiFunction<? super T, Throwable, ? extends U> fn);
219+
<U> Promise<U> handleAsync(BiFunction<? super T, Throwable, ? extends U> fn);
220220

221-
public <U> Promise<U> handleAsync(BiFunction<? super T, Throwable, ? extends U> fn, Executor executor);
221+
<U> Promise<U> handleAsync(BiFunction<? super T, Throwable, ? extends U> fn, Executor executor);
222222

223223
}

src/main/java/net/tascalate/concurrent/RetryPolicy.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@
3232
public class RetryPolicy {
3333

3434
public static interface Outcome {
35-
abstract public boolean shouldExecute();
36-
abstract public long backoffDelayMillis();
37-
abstract public long timeoutDelayMillis();
35+
boolean shouldExecute();
36+
long backoffDelayMillis();
37+
long timeoutDelayMillis();
3838

39-
default public boolean hasTimeout() {
39+
default boolean hasTimeout() {
4040
return timeoutDelayMillis() > 0;
4141
}
4242
}

0 commit comments

Comments
 (0)