Align configuration properties and more#1785
Conversation
Initial goal is to make Resolver 1.x configuration keys transparently supported, but also reduce the copy pasta around "common" HTTP configuration as well. Fixes apache#1783
| * @see RepositorySystemSession#getConfigProperties() | ||
| * @since 2.0.15 | ||
| */ | ||
| public final class TransportUtils { |
There was a problem hiding this comment.
Why not introducing AbstractHttpTransporter extends AbstractTransporter implements HttpTransporter and put those methods there and then inherit from it in all HTTP transporter impls?
There was a problem hiding this comment.
All those methods seems HTTP specific anyhow.
There was a problem hiding this comment.
HttpTransport is in SPI, ConfigUtil is in utils. Spi and Utils does not depend on each other, only on API. This looks much simpler, but I have to admit I started on same trail you suggest, just to realize is impossible.
There was a problem hiding this comment.
api
/ \
spi util
\ /
(any) transport
There was a problem hiding this comment.
Why not changing that, i.e. make SPI dependent on util as well?
There was a problem hiding this comment.
Nope, I don't want to touch dep layout in patch release.
There was a problem hiding this comment.
Ok, let us then just rename this to HttpTransport(er)Utils. I would not want to mix it with other more generic configuration.
There was a problem hiding this comment.
Ok, but in that case I'd not only rename but also align packages with SPI (so move it deeper into http package just like HttpTransport is in SPI)
...til/src/main/java/org/eclipse/aether/util/connector/transport/http/HttpTransporterUtils.java
Outdated
Show resolved
Hide resolved
…ector/transport/http/HttpTransporterUtils.java Co-authored-by: Konrad Windszus <konrad@windszus.net>
Initial goal is to make Resolver 1.x configuration keys transparently supported, but also reduce the copy pasta around "common" HTTP configuration as well. Transport still needs to take care about their own "native" params (supported only by them).
Changes:
Fixes #1783