dispatch / reboot

Scala wrapper for the Java AsyncHttpClient.
https://dispatchhttp.org
GNU Lesser General Public License v3.0
428 stars 105 forks source link

fix warnings #202

Closed xuwei-k closed 6 years ago

xuwei-k commented 6 years ago

https://travis-ci.org/dispatch/reboot/jobs/392777259#L719

[warn] /home/travis/build/dispatch/reboot/core/src/test/scala/retry.scala:58:51: Eta-expansion of zero-argument methods is deprecated. To avoid this warning, write (() => rc.succeedOn(0)()).
[warn]     val p = retry.Backoff(maxRetries)(rc.succeedOn(0))
[warn]                                                   ^
[warn] /home/travis/build/dispatch/reboot/core/src/test/scala/retry.scala:64:52: Eta-expansion of zero-argument methods is deprecated. To avoid this warning, write (() => rc.succeedOn(maxRetries)()).
[warn]     val p = retry.Directly(maxRetries)(rc.succeedOn(maxRetries))
[warn]                                                    ^
[warn] /home/travis/build/dispatch/reboot/core/src/test/scala/retry.scala:70:52: Eta-expansion of zero-argument methods is deprecated. To avoid this warning, write (() => rc.succeedOn(maxRetries.+(1))()).
[warn]     val p = retry.Directly(maxRetries)(rc.succeedOn(maxRetries + 1))
[warn]                                                    ^
[warn] /home/travis/build/dispatch/reboot/core/src/test/scala/retry.scala:79:19: Eta-expansion of zero-argument methods is deprecated. To avoid this warning, write (() => rc.succeedOn(max)()).
[warn]     )(rc.succeedOn(max))
[warn]                   ^
[warn] /home/travis/build/dispatch/reboot/core/src/test/scala/retry.scala:88:19: Eta-expansion of zero-argument methods is deprecated. To avoid this warning, write (() => rc.succeedOn(max.+(1))()).
[warn]     )(rc.succeedOn(max + 1))
[warn]                   ^
[warn] 5 warnings found