Skip to content

Commit

Permalink
Fix reflection warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
niwinz committed Feb 5, 2020
1 parent 6710b18 commit 76a779e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
17 changes: 9 additions & 8 deletions src/promesa/exec.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,18 @@
#?(:cljs [goog.object :as gobj]))
#?(:clj
(:import
java.util.function.Supplier
java.util.concurrent.ForkJoinPool
java.util.concurrent.Future
java.util.concurrent.Callable
java.util.concurrent.CompletableFuture
java.util.concurrent.ExecutorService
java.util.concurrent.Executor
java.util.concurrent.TimeoutException
java.util.concurrent.ExecutorService
java.util.concurrent.Executors
java.util.concurrent.ForkJoinPool
java.util.concurrent.Future
java.util.concurrent.ScheduledExecutorService
java.util.concurrent.ThreadFactory
java.util.concurrent.TimeUnit
java.util.concurrent.ScheduledExecutorService
java.util.concurrent.Executors)))
java.util.concurrent.TimeoutException
java.util.function.Supplier)))

;; --- Globals & Defaults (with CLJS Impl)

Expand Down Expand Up @@ -273,7 +274,7 @@
(extend-type ScheduledExecutorService
pt/IScheduler
(-schedule! [this ms f]
(let [fut (.schedule this f ms TimeUnit/MILLISECONDS)]
(let [fut (.schedule this ^Callable f ^long ms TimeUnit/MILLISECONDS)]
(ScheduledTask. fut)))))

#?(:cljs
Expand Down
6 changes: 3 additions & 3 deletions src/promesa/impl.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,9 @@
(if (instance? CompletionException e)
(f (.getCause ^Exception e))
(f e)))]
(.exceptionally ^CompletionStage it
^Function (pu/->FunctionWrapper handler)
^Executor (exec/resolve-executor executor)))))
(.exceptionallyAsync ^CompletionStage it
^Function (pu/->FunctionWrapper handler)
^Executor (exec/resolve-executor executor)))))

(-thenErr
([it f]
Expand Down

0 comments on commit 76a779e

Please sign in to comment.