Skip to content

Commit 89d4a15

Browse files
authored
avoid deprecated function interfaces (#710)
* avoid deprecated function interfaces * more changes * mima
1 parent 5ef95eb commit 89d4a15

4 files changed

Lines changed: 34 additions & 8 deletions

File tree

http-caching/src/main/java/org/apache/pekko/http/caching/javadsl/Cache.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515

1616
import org.apache.pekko.annotation.ApiMayChange;
1717
import org.apache.pekko.annotation.DoNotInherit;
18-
import org.apache.pekko.japi.Creator;
19-
import org.apache.pekko.japi.Procedure;
18+
import org.apache.pekko.japi.function.Creator;
19+
import org.apache.pekko.japi.function.Procedure;
2020

2121
import java.util.Optional;
2222
import java.util.concurrent.CompletableFuture;
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
# Change to pekko.util.function Functional Interfaces
19+
ProblemFilters.exclude[IncompatibleMethTypeProblem]("org.apache.pekko.http.caching.javadsl.Cache.getFuture")
20+
ProblemFilters.exclude[IncompatibleMethTypeProblem]("org.apache.pekko.http.caching.javadsl.Cache.getOrFulfil")
21+
ProblemFilters.exclude[IncompatibleMethTypeProblem]("org.apache.pekko.http.caching.javadsl.Cache.getOrCreateStrict")
22+
ProblemFilters.exclude[ReversedMissingMethodProblem]("org.apache.pekko.http.caching.javadsl.Cache.getFuture")
23+
ProblemFilters.exclude[ReversedMissingMethodProblem]("org.apache.pekko.http.caching.javadsl.Cache.getOrFulfil")
24+
ProblemFilters.exclude[ReversedMissingMethodProblem]("org.apache.pekko.http.caching.javadsl.Cache.getOrCreateStrict")
25+
ProblemFilters.exclude[IncompatibleMethTypeProblem]("org.apache.pekko.http.caching.scaladsl.Cache.getFuture")
26+
ProblemFilters.exclude[IncompatibleMethTypeProblem]("org.apache.pekko.http.caching.scaladsl.Cache.getOrFulfil")
27+
ProblemFilters.exclude[IncompatibleMethTypeProblem]("org.apache.pekko.http.caching.scaladsl.Cache.getOrCreateStrict")

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,18 @@ package org.apache.pekko.http.caching
1616
import java.util.concurrent.{ CompletableFuture, Executor, TimeUnit }
1717
import java.util.function.BiFunction
1818

19-
import org.apache.pekko
20-
import pekko.actor.ActorSystem
21-
import pekko.annotation.{ ApiMayChange, InternalApi }
22-
2319
import scala.collection.JavaConverters._
2420
import scala.concurrent.duration.Duration
2521
import scala.concurrent.{ ExecutionContext, Future }
22+
2623
import com.github.benmanes.caffeine.cache.{ AsyncCache, Caffeine }
24+
import org.apache.pekko
25+
import pekko.actor.ActorSystem
26+
import pekko.annotation.{ ApiMayChange, InternalApi }
2727
import pekko.http.caching.LfuCache.toJavaMappingFunction
2828
import pekko.http.caching.scaladsl.Cache
2929
import pekko.http.impl.util.JavaMapping.Implicits._
3030
import pekko.http.caching.CacheJavaMapping.Implicits._
31-
3231
import pekko.util.FutureConverters._
3332
import pekko.util.FunctionConverters._
3433

http-caching/src/main/scala/org/apache/pekko/http/caching/scaladsl/Cache.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import java.util.concurrent.{ CompletableFuture, CompletionStage }
1818

1919
import org.apache.pekko
2020
import pekko.annotation.{ ApiMayChange, DoNotInherit }
21-
import pekko.japi.{ Creator, Procedure }
21+
import pekko.japi.function.{ Creator, Procedure }
2222
import pekko.util.FutureConverters._
2323

2424
import scala.collection.JavaConverters._

0 commit comments

Comments
 (0)