From b4a8e613af348e49157d0267ef33b0934bffdfa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=99=8E=E9=B8=A3?= Date: Sat, 4 Jan 2025 20:46:38 +0800 Subject: [PATCH 1/3] chore: Make AddFutureAwaitResult an AnyVal --- .../main/scala/org/apache/pekko/http/impl/util/package.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 = { From 6e7d6ddfe609a13c365639845e15190561f36016 Mon Sep 17 00:00:00 2001 From: He-Pin Date: Wed, 7 May 2025 15:00:55 +0800 Subject: [PATCH 2/3] chore: add mima --- .../add-future-await-result-anyval.excludes | 1 + 1 file changed, 1 insertion(+) create mode 100644 http-core/src/main/mima-filters/1.2.x.backwards.excludes/add-future-await-result-anyval.excludes 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..ec3aa8be92 --- /dev/null +++ b/http-core/src/main/mima-filters/1.2.x.backwards.excludes/add-future-await-result-anyval.excludes @@ -0,0 +1 @@ +ProblemFilters.exclude[IncompatibleResultTypeProblem]("org.apache.pekko.http.impl.util.package.AddFutureAwaitResult") From 60b30b455dd24ec355533362205a6b45ee94976e Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Fri, 9 May 2025 17:15:49 +0100 Subject: [PATCH 3/3] Update add-future-await-result-anyval.excludes --- .../add-future-await-result-anyval.excludes | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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 index ec3aa8be92..6161fd5251 100644 --- 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 @@ -1 +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")