From 4078e4cb39812f1085bd38fdcaca2de35f2dffc7 Mon Sep 17 00:00:00 2001 From: Christopher Coco Date: Thu, 18 Oct 2018 19:09:06 +0000 Subject: [PATCH] Deprecate c.t.server.AdminHttpServer#routes Problem `c.t.server.AdminHttpServer#routes` should have been marked deprecated some time ago. Solution Mark `c.t.server.AdminHttpServer#routes` as deprecated. Differential Revision: https://phabricator.twitter.biz/D230247 --- CHANGELOG.rst | 6 ++++++ .../src/main/scala/com/twitter/server/AdminHttpServer.scala | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 6da706ff..337a9137 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -7,6 +7,12 @@ Note that ``PHAB_ID=#`` and ``RB_ID=#`` correspond to associated messages in com Unreleased ---------- +Changes +~~~~~~~ + +* Deprecate `c.t.server.AdminHttpServer#routes`. Routes should be added to the `AdminHttpServer` + via `c.t.server.AdminHttpServer#addAdminRoutes`. ``PHAB_ID=D230247`` + Runtime Behavior Changes ~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/server/src/main/scala/com/twitter/server/AdminHttpServer.scala b/server/src/main/scala/com/twitter/server/AdminHttpServer.scala index 1ab6def9..51d4353a 100644 --- a/server/src/main/scala/com/twitter/server/AdminHttpServer.scala +++ b/server/src/main/scala/com/twitter/server/AdminHttpServer.scala @@ -180,8 +180,7 @@ trait AdminHttpServer { self: App => addAdminRoutes(Seq(route)) } - // TODO: remove routes, have all routes be added via addAdminRoutes - // For now these routes will be added to allRoutes in premain + @deprecated("Routes should be added via `AdminHttpServer#addAdminRoutes`", "2018-10-17") protected def routes: Seq[Route] = Nil /**