Repository navigation
Treat OkHttp Request as non-nullable - #7388
Conversation
The return type and the parameter type of these methods are OkHttpObservationInterceptor$CallState which is package-private so this method is not really usable for the users.
|
/cc @jckoenen |
…rceptor Previously a new DefaultOkHttpObservationConvention was created for each request.
shakuzen
left a comment
There was a problem hiding this comment.
Looks good. I agree more tests would be nice to ensure something subtle hasn't broken. It will also be good to get some testing by users with these changes before GA.
| if (request == null) { | ||
| return unknownRequestTags; | ||
| } | ||
| private Iterable<KeyValue> getRequestTags(Request request) { |
There was a problem hiding this comment.
Nit: it looks like the return type could be more specifically typed as KeyValues. Feel free to ignore in this PR since it's the same as before these changes.
There was a problem hiding this comment.
I don't want to ignore this but I think this might be better fixed in a different PR given that the return type here is Iterable because of List<KeyValue> tagsToKeyValues and also there is this TODO comment:
// TODO: Tags to key values and back - maybe we can improve this?
So I would fix this with the underlying issue (tags-keyvalues conversions).
|
@jckoenen could you try out 1.17.0 snapshots and let us know if you have any problems with these changes? |
|
@shakuzen Sorry, it took a bit to get to it. Using Thank you all for your work! |
|
Thanks for trying it out and letting us know. We should have an RC1 release out on Monday for further testing. |
The return type and the parameter type of the getState/setState methods are
OkHttpObservationInterceptor$CallStatewhich is package-private so they are not really usable for the users.See gh-7373
See gh-7375
TODO:
I think reviewing commit-by-commit might be easier than reviewing the whole.