Skip to content

Commit 97c92b4

Browse files
feat(api): manual updates (#43)
1 parent 394e18d commit 97c92b4

15 files changed

+1993
-128
lines changed

openlayer-java-core/src/main/kotlin/com/openlayer/api/core/Utils.kt

-14
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,4 @@ internal fun <K, V> ListMultimap<K, V>.toUnmodifiable(): ListMultimap<K, V> {
3939
return Multimaps.unmodifiableListMultimap(this)
4040
}
4141

42-
@JvmSynthetic
43-
internal fun ListMultimap<String, String>.getRequiredHeader(header: String): String {
44-
val value =
45-
entries()
46-
.stream()
47-
.filter { entry -> entry.key.equals(header, ignoreCase = true) }
48-
.map { entry -> entry.value }
49-
.findFirst()
50-
if (!value.isPresent) {
51-
throw OpenlayerInvalidDataException("Could not find $header header")
52-
}
53-
return value.get()
54-
}
55-
5642
internal interface Enum

openlayer-java-core/src/main/kotlin/com/openlayer/api/core/http/RetryingHttpClient.kt

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.openlayer.api.core.http
22

3-
import com.google.common.util.concurrent.MoreExecutors
43
import com.openlayer.api.core.RequestOptions
54
import com.openlayer.api.errors.OpenlayerIoException
65
import java.io.IOException
@@ -116,8 +115,10 @@ private constructor(
116115
executeWithRetries(request, requestOptions)
117116
}
118117
},
119-
MoreExecutors.directExecutor()
120-
)
118+
) {
119+
// Run in the same thread.
120+
it.run()
121+
}
121122
.thenCompose(Function.identity())
122123
}
123124

0 commit comments

Comments
 (0)