-
Notifications
You must be signed in to change notification settings - Fork 232
Remove deprecated API - HttpSender and RemoteBaggMana #431
Remove deprecated API - HttpSender and RemoteBaggMana #431
Conversation
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* @deprecated use {@link Builder} | ||
*/ | ||
@Deprecated | ||
public HttpSender(String endpoint) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that now it's not possible to override this class
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not good :)
* @deprecated use {@link Builder} | ||
*/ | ||
@Deprecated | ||
public RemoteBaggageRestrictionManager( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that now it's not possible to override this class
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not good, then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @black-adder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops, my bad, we shouldn't deprecate this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want to deprecate it and use builder instead. Does protected constructor work for you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's fine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks the private with the most parameters is changed from private to protected
protected RemoteBaggageRestrictionManager(
String serviceName,
BaggageRestrictionManagerProxy proxy,
Metrics metrics,
boolean denyBaggageOnInitializationFailure,
int refreshIntervalMs,
int initialDelayMs
) {
Codecov Report
@@ Coverage Diff @@
## master #431 +/- ##
============================================
+ Coverage 87.15% 87.32% +0.16%
+ Complexity 510 509 -1
============================================
Files 65 65
Lines 1978 1972 -6
Branches 258 258
============================================
- Hits 1724 1722 -2
+ Misses 164 160 -4
Partials 90 90
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's clarify the need for subclassing HttpSender
and the RemoteBaggageRestrictionManager
.
I am not sure if people are overriding it. We can make builder constructors provided is needed. |
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
It's more about the message we are sending: do we let subclass it, or should they never subclass it? If the |
I am not quite sure about ^^. There are public APIs which are not extensible. Maybe our question is: is there a reason to extend it? Do people need it? From the API design perspective, visibility should be restricted as much as possible. If people ask for it make it public |
True, but then they marked as "final".
That's indeed the question. There's only one method that could be overridden, so, one could just extend |
Dismissing review, to discuss whether HttpSender/RemoteBaggageRestrictionManager should be extensible
Related to #414 (comment)
Signed-off-by: Pavol Loffay ploffay@redhat.com