client_java icon indicating copy to clipboard operation
client_java copied to clipboard

Deprecate public HTTPServer constructors/Recommend using HTTPServer.Builder

Open dhoard opened this issue 3 years ago • 1 comments

Description

Deprecate public HTTPServer constructors and recommend using HTTPServer.Builder

Background

As part of recent work, an HTTPServer.Builder class was added to build HTTPServer instances. HTTPServer has multiple constructors which can cause confusion.

Use of the HTTPServer.Builder is cleaner than the multiple/various multiple arguments constructors.

Proposal

Mark all public HTTPServer constructors as deprecated.

Impact

Use of existing constructors will generate deprecation warnings, but will not cause code to be refactored.

Long Term

Remove public HTTPServer constructors and force code to be refactored to use the HTTPServer.Builder.

dhoard avatar Sep 14 '21 17:09 dhoard

Related PR https://github.com/prometheus/client_java/pull/747

dhoard avatar Dec 28 '21 19:12 dhoard