Skip to content

Commit e2dd21f

Browse files
committed
FailsafeExecutor.getCall -> newCall
1 parent c84e8c6 commit e2dd21f

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

core/src/main/java/dev/failsafe/FailsafeExecutor.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,12 @@ public <T extends R> T get(ContextualSupplier<T, T> supplier) {
124124
}
125125

126126
/**
127-
* Returns a call that can execute the {@code supplier} until a successful result is returned or the configured
127+
* Returns a call that can execute the {@code runnable} until a successful result is returned or the configured
128128
* policies are exceeded.
129129
*
130-
* @throws NullPointerException if the {@code supplier} is null
130+
* @throws NullPointerException if the {@code runnable} is null
131131
*/
132-
public Call<Void> getCall(ContextualRunnable<Void> runnable) {
132+
public Call<Void> newCall(ContextualRunnable<Void> runnable) {
133133
return callSync(toCtxSupplier(runnable));
134134
}
135135

@@ -139,7 +139,7 @@ public Call<Void> getCall(ContextualRunnable<Void> runnable) {
139139
*
140140
* @throws NullPointerException if the {@code supplier} is null
141141
*/
142-
public <T extends R> Call<T> getCall(ContextualSupplier<T, T> supplier) {
142+
public <T extends R> Call<T> newCall(ContextualSupplier<T, T> supplier) {
143143
return callSync(Assert.notNull(supplier, "supplier"));
144144
}
145145

modules/okhttp/src/main/java/dev/failsafe/okhttp/FailsafeCall.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public FailsafeCall clone() {
9696
public Response execute() throws IOException {
9797
Assert.isTrue(executed.compareAndSet(false, true), "already executed");
9898

99-
failsafeCall = failsafe.getCall(ctx -> {
99+
failsafeCall = failsafe.newCall(ctx -> {
100100
return prepareCall(ctx).execute();
101101
});
102102

modules/retrofit/src/main/java/dev/failsafe/retrofit/FailsafeCall.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public FailsafeCall<T> clone() {
9898
public Response<T> execute() throws IOException {
9999
Assert.isTrue(executed.compareAndSet(false, true), "already executed");
100100

101-
failsafeCall = failsafe.getCall(ctx -> {
101+
failsafeCall = failsafe.newCall(ctx -> {
102102
return prepareCall(ctx).execute();
103103
});
104104

0 commit comments

Comments
 (0)