From a05e5e7b69d1b8237d8a6360d00c031172a2db0f Mon Sep 17 00:00:00 2001 From: Ryan O'Neill Date: Wed, 12 Dec 2018 02:32:58 +0000 Subject: [PATCH] finagle-core: Remove Deprecated ServerBuilder.stack Method Problem / Solution The `ServerBuilder.stack` method which takes a function has been deprecated for at least three years. It prevents the `ServerBuilder` class from being structured in a similar fashion to `ClientBuilder` and should be removed. This commit removes it. JIRA Issues: CSL-7377 Differential Revision: https://phabricator.twitter.biz/D251975 --- CHANGELOG.rst | 4 ++++ .../twitter/finagle/builder/ServerBuilder.scala | 16 ---------------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 4d84fbd435..81af6cd732 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -41,6 +41,10 @@ Breaking API Changes these methods within `TransportContext` should be changed to use the corresponding methods on `c.t.f.t.Transport` instead. ``PHAB_ID=D244742`` +* finagle-core: The deprecated `c.t.f.b.ServerBuilder.stack` method which takes a function + has been removed. Uses of this method should be changed to use the `c.t.f.b.ServerBuilder.stack` + method which takes a `c.t.f.s.StackBasedServer` instead. ``PHAB_ID=D251975`` + * finagle-core: The deprecated `c.t.f.t.Transport.peerCertificate` method on the `Transport` class (not the `Transport.peerCertificate` Finagle context) has been removed. Uses of this method should be changed to use `c.t.f.t.TransportContext.peerCertificate` instead. diff --git a/finagle-core/src/main/scala/com/twitter/finagle/builder/ServerBuilder.scala b/finagle-core/src/main/scala/com/twitter/finagle/builder/ServerBuilder.scala index 8f0718fd44..6ed2525c49 100644 --- a/finagle-core/src/main/scala/com/twitter/finagle/builder/ServerBuilder.scala +++ b/finagle-core/src/main/scala/com/twitter/finagle/builder/ServerBuilder.scala @@ -227,22 +227,6 @@ class ServerBuilder[Req, Rep, HasCodec, HasBindTo, HasName] private[builder] ( def configured[P](paramAndStackParam: (P, Stack.Param[P])): This = copy(params.+(paramAndStackParam._1)(paramAndStackParam._2), mk) - /** - * Overrides the stack and [[com.twitter.finagle.Server]] that will be used - * by this builder. - * - * @param mk A function that materializes a `Server` from a set of `Params`. - * `mk` is passed the state of configuration when `build` is called. There is - * no guarantee that all the builder parameters will be used by the server - * created by `mk`; it is up to the discretion of the server and protocol - * implementation. - */ - @deprecated("Use stack(server: StackBasedServer)", "7.0.0") - def stack[Req1, Rep1]( - mk: Stack.Params => FinagleServer[Req1, Rep1] - ): ServerBuilder[Req1, Rep1, Yes, HasBindTo, HasName] = - copy(params, mk) - /** * Overrides the stack and [[com.twitter.finagle.Server]] that will be used * by this builder.