Minor bugfix: If proxy host cannot be resolved, fail#1793
Minor bugfix: If proxy host cannot be resolved, fail#1793cstamas merged 1 commit intoapache:masterfrom
Conversation
As otherwise it goes unnoticed silently.
| InetSocketAddress proxyAddress = new InetSocketAddress( | ||
| repository.getProxy().getHost(), repository.getProxy().getPort()); | ||
| if (proxyAddress.isUnresolved()) { | ||
| throw new IllegalStateException( |
There was a problem hiding this comment.
Do the other transporters behave the same? If so we should have an IT, otherwise I would rather warn only instead of throwing an exception.
There was a problem hiding this comment.
Again, Resolver does not have any IT suite.
I wholeheartedly agree with assessment, but am unsure we want to start creating IT suite now (just before releases) as it would delay things for quite some.
There was a problem hiding this comment.
I was referring to the tests in https://github.com/apache/maven-resolver/blob/master/maven-resolver-test-http/src/main/java/org/eclipse/aether/internal/test/util/http/HttpTransporterTest.java (those are more IT than UT from my point of view). Should be easy to add a method which tests with an invalid proxy address, isn't it?
slawekjaranowski
left a comment
There was a problem hiding this comment.
ok, it is ok for me ... probably error will occurs somewhere else later
|
I agree with @slawekjaranowski here: you set proxy either as you must or want. In both cases, fx with hostname typo, outcome is:
Note: same thing as with port: if host is resolved but port is wrong, you'd get immediate failure. |
To emit proper message saying what is the issue (ie typo in hostname of proxy).