Skip to content

Commit b8d393e

Browse files
authored
use Scala FunctionConverter and remove some unused implicits (#778)
1 parent ba0aced commit b8d393e

File tree

8 files changed

+8
-18
lines changed

8 files changed

+8
-18
lines changed

http-caching/src/main/scala/org/apache/pekko/http/caching/LfuCache.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import java.util.function.BiFunction
1919
import scala.concurrent.duration.Duration
2020
import scala.concurrent.{ ExecutionContext, Future }
2121
import scala.jdk.CollectionConverters._
22+
import scala.jdk.FunctionConverters._
2223
import scala.jdk.FutureConverters._
2324

2425
import com.github.benmanes.caffeine.cache.{ AsyncCache, Caffeine }
@@ -29,7 +30,6 @@ import pekko.http.caching.LfuCache.toJavaMappingFunction
2930
import pekko.http.caching.scaladsl.Cache
3031
import pekko.http.impl.util.JavaMapping.Implicits._
3132
import pekko.http.caching.CacheJavaMapping.Implicits._
32-
import pekko.util.FunctionConverters._
3333

3434
@ApiMayChange
3535
object LfuCache {

http-core/src/main/scala/org/apache/pekko/http/impl/util/EnhancedByteStringTraversableOnce.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ package org.apache.pekko.http.impl.util
1515

1616
import org.apache.pekko
1717
import pekko.annotation.InternalApi
18-
import pekko.http.ccompat._
1918
import pekko.util.ByteString
2019

2120
/**

http-core/src/main/scala/org/apache/pekko/http/scaladsl/model/Multipart.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import java.util.concurrent.CompletionStage
2121
import org.apache.pekko
2222
import pekko.annotation.InternalApi
2323
import pekko.event.LoggingAdapter
24-
import pekko.http.ccompat._
2524
import pekko.http.impl.engine.rendering.BodyPartRenderer
2625
import pekko.http.impl.util.{ DefaultNoLogging, Util }
2726
import pekko.http.impl.util.JavaMapping.Implicits._

http-tests/src/multi-jvm/scala/org/apache/pekko/remote/testkit/MultiNodeConfig.scala

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,23 @@
1313

1414
package org.apache.pekko.remote.testkit
1515

16-
import language.implicitConversions
1716
import java.net.{ InetAddress, InetSocketAddress }
1817

1918
import com.typesafe.config.{ Config, ConfigFactory, ConfigObject }
2019

20+
import language.implicitConversions
2121
import scala.concurrent.{ Await, Awaitable }
22-
import scala.util.control.NonFatal
22+
import scala.concurrent.duration._
2323
import scala.collection.immutable
24+
import scala.util.control.NonFatal
25+
2426
import org.apache.pekko
2527
import pekko.actor._
26-
import pekko.util.Timeout
27-
import pekko.http.ccompat._
28-
import pekko.remote.testconductor.{ TestConductor, TestConductorExt }
28+
import pekko.event.{ LogSource, Logging, LoggingAdapter }
29+
import pekko.remote.testconductor.{ RoleName, TestConductor, TestConductorExt }
2930
import pekko.testkit._
3031
import pekko.testkit.TestEvent._
31-
32-
import scala.concurrent.duration._
33-
import pekko.remote.testconductor.RoleName
34-
import pekko.actor.RootActorPath
35-
import pekko.event.{ LogSource, Logging, LoggingAdapter }
32+
import pekko.util.Timeout
3633

3734
/**
3835
* Configure the role names and participants of the test, including configuration settings.

http/src/main/scala/org/apache/pekko/http/javadsl/server/directives/FormFieldDirectives.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import pekko.http.scaladsl.server.{ Directives => D }
2525
import pekko.http.scaladsl.server.directives.ParameterDirectives._
2626

2727
import scala.jdk.CollectionConverters._
28-
import pekko.http.impl.util.JavaMapping.Implicits._
2928
import scala.jdk.OptionConverters._
3029

3130
abstract class FormFieldDirectives extends FileUploadDirectives {

http/src/main/scala/org/apache/pekko/http/javadsl/server/directives/HeaderDirectives.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ import java.util.{ function => jf }
1818

1919
import org.apache.pekko
2020
import pekko.actor.ReflectiveDynamicAccess
21-
22-
import pekko.http.impl.util.JavaMapping.Implicits._
2321
import pekko.http.javadsl.model.headers.{ HttpOriginRange, HttpOriginRanges }
2422
import pekko.http.javadsl.model.HttpHeader
2523
import pekko.http.javadsl.server.Route

http/src/main/scala/org/apache/pekko/http/scaladsl/common/StrictForm.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import scala.concurrent.{ ExecutionContext, Future }
1919
import scala.concurrent.duration._
2020
import org.apache.pekko
2121
import pekko.stream.Materializer
22-
import pekko.http.ccompat._
2322
import pekko.http.scaladsl.unmarshalling._
2423
import pekko.http.scaladsl.model._
2524
import pekko.http.scaladsl.util.FastFuture

http/src/main/scala/org/apache/pekko/http/scaladsl/marshalling/Marshal.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ package org.apache.pekko.http.scaladsl.marshalling
1515

1616
import scala.concurrent.{ ExecutionContext, Future }
1717
import org.apache.pekko
18-
import pekko.http.ccompat._
1918
import pekko.http.scaladsl.server.ContentNegotiator
2019
import pekko.http.scaladsl.model._
2120
import pekko.http.scaladsl.util.FastFuture._

0 commit comments

Comments
 (0)