-
Notifications
You must be signed in to change notification settings - Fork 144
Minor bugfix: If proxy host cannot be resolved, fail #1793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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).