diff --git a/http-core/src/main/mima-filters/1.2.x.backwards.excludes/add-future-await-result-anyval.excludes b/http-core/src/main/mima-filters/1.2.x.backwards.excludes/add-future-await-result-anyval.excludes new file mode 100644 index 0000000000..6161fd5251 --- /dev/null +++ b/http-core/src/main/mima-filters/1.2.x.backwards.excludes/add-future-await-result-anyval.excludes @@ -0,0 +1,19 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# Make AddFutureAwaitResult an AnyVal +ProblemFilters.exclude[IncompatibleResultTypeProblem]("org.apache.pekko.http.impl.util.package.AddFutureAwaitResult") diff --git a/http-core/src/main/scala/org/apache/pekko/http/impl/util/package.scala b/http-core/src/main/scala/org/apache/pekko/http/impl/util/package.scala index bfbe15e09b..3c2273d8a7 100644 --- a/http-core/src/main/scala/org/apache/pekko/http/impl/util/package.scala +++ b/http-core/src/main/scala/org/apache/pekko/http/impl/util/package.scala @@ -68,7 +68,7 @@ package object util { private[http] def installEventStreamLoggerFor[T](implicit ct: ClassTag[T], system: ActorSystem): Unit = installEventStreamLoggerFor(ct.runtimeClass) - private[http] implicit class AddFutureAwaitResult[T](future: Future[T]) { + private[http] implicit class AddFutureAwaitResult[T](val future: Future[T]) extends AnyVal { /** "Safe" Await.result that doesn't throw away half of the stacktrace */ def awaitResult(atMost: Duration): T = {